Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
MapReduce >> mail # user >> Reading fields from a Text line


Copy link to this message
-
Reading fields from a Text line
Hello list,

       I have a flat file in which data is stored as lines of 107
bytes each. I need to skip the first 8 lines(as they don't contain any
valuable info). Thereafter, I have to read each line and extract the
information from them, but not the line as a whole. Each line is
composed of several fields without any delimiter between them. For
example, the first field is of 8 bytes, second of 2 bytes and so on. I
was trying to reach each line as a Text value, convert it into string
and using String.subring() method to extract the value of each field.
But it seems I am not doing  things in correct way. Need some
guidance. Many thanks.

Regards,
    Mohammad Tariq
+
Harsh J 2012-08-02, 02:53
+
Sriram Ramachandrasekaran... 2012-08-02, 05:28
+
Mohammad Tariq 2012-08-02, 10:18
+
Bejoy KS 2012-08-02, 11:08
+
Mohammad Tariq 2012-08-02, 12:39
+
Bejoy Ks 2012-08-02, 15:27
+
Bejoy Ks 2012-08-02, 23:11
+
Harsh J 2012-08-03, 07:32
+
Bejoy KS 2012-08-03, 07:37
+
Harsh J 2012-08-03, 10:58
+
Bejoy KS 2012-08-03, 15:23
+
Alok Kumar 2012-08-02, 10:52
+
Sriram Ramachandrasekaran... 2012-08-02, 10:48