Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Conversion tool

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I finished my implementation of the Conversion tool a few days ago. Anyone interested discussing his/her implementations with me and exchanging thoughts on this, let's start
regards to all,
matt
 
gemini kenny
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How long does it take to do the conversion tool? Have u done it by means of a GUI? How do we check that we have done it correctly or not?
Jayanthi.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by gemini:
Hi,
How long does it take to do the conversion tool? Have u done it by means of a GUI? How do we check that we have done it correctly or not?
Jayanthi.

Well it takes as long as you want it to. I don't know the answer to this question. It probably depends on many factors like how good you are in object-oriented design etc.
I have done it as a command-line tool.
Your binary file has to be read by Data class constructor (study your Data class). If everything is ok, you should not get any error messages when using this constructor.
Regards,
matt
 
krishnan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i used the data class methods to (constructor and write method) to create a fresh database for the data file and write all the records to it. for this the whole thing does not take more than an hour for coding + testing.
It is a command line tool, i dont think the assignment wants this to be integrated with rest of the system.
 
gemini kenny
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just very curious about one thing in the Data class constructor - why does the writing of the 'MAGIC' number come at the end? I thought 'MAGIC' number should be the first thing in a file to indicate it is an executable or binary file. Please correct me if I am wrong.
 
Remco Rotteveel
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right about the MAGIC. I once tried to open some random files to see what would happen, and it wasn't pretty. The constructor reads an int from the file and makes a FieldInfo[] the size of that int. With one non-database file I noticed that it was trying to create a FieldInfo[] with more than a billion elements, so it threw an OutOfMemoryError. Different files produce different exceptions, but it is very hard to catch them.
So yes, the MAGIC should be the first thing in the file.
Regards,
Remco.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel MAGIC is for the integrity of the file. When you reach MAGIC the file pointer should be at "Header Length", if the file
pointer at MAGIC and header length don't match that means the file has been altered and the integrity is lost
--Kiran

Originally posted by Remco Rotteveel:
Yes, you are right about the MAGIC. I once tried to open some random files to see what would happen, and it wasn't pretty. The constructor reads an int from the file and makes a FieldInfo[] the size of that int. With one non-database file I noticed that it was trying to create a FieldInfo[] with more than a billion elements, so it threw an OutOfMemoryError. Different files produce different exceptions, but it is very hard to catch them.
So yes, the MAGIC should be the first thing in the file.
Regards,
Remco.

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the Magic Number you are talking abt? Someone enlighten me
 
gemini kenny
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Data.java file if u have downloaded the assignment...
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it be better to sub class the Data class and do the conversion work or is it better to do the stuff in the Data class itself ?
What are the tradeoffs ?
According to me, advantages of sub classing outweigh the disadvantages. Anybody else think differently ???
Best Regards,
ST
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just completed the Data Conversion Tool in my proj and I rearing to do the next set of specifications in the assignment.
For my data conversion tool I have used an ascii file to have the meta data and this was written as the header. Data class was in turn used for created the binary file and the records of my database.
The whole data conversion tool runs as an application and takes paramets of the dataset, the meta data file and the name of the database. All these files are assumed to be in the local system and is not built for the network.
I want to listen to ur comments abt the methodolgy I have used.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might be very basic question. Please help me. How to create a binary file??
So far my understanding is, an object obj if we write in a file with writeObject method then that file is called a binary file.
Is this correct??? Please help me.
Thanks,
Rajini
 
Jose Guerra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just rechecked my assignment document and it doesn't say in the 'What you must do' section that I have to make this tool...
are the assignments different in this regard?
 
Emmanuel Bakare
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would kindly request that someone(or more) should take me through what I need to do about the data conversion tool.
Emmanuel Bakare
 
James McGee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on when you downloaded the assignment. I downloaded twice, once last year, and once again this year. The older version of the assignment requires you to build the conversion tool. The newer assignment doesn't. I wrote to Sun, and they said to use the newer version of the assignment.
I don't think they would hold it against you if you did create the conversion tool however (assuming you have the older assignment copy).
- James
 
Aslam Chima
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What was this conversion tool for am I missing some thing here... I downloaded the assignment a couple of weeks ago and it didn't mentioned about any conversion tools.
Aslam
 
Esenih Camai
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded my assignment last week, nowhere is conversion tool mentioned. Is this conversion tool something you HAVE TO do to finish you assignment?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the newest version there is no call for a conversion tool.
It used to be that they would give you a text file, that you had to read, and place into the classes, that you would then rewrite to a Binary file, which was just the Data object serialized.
You no longer need to do that.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic