Sure, only map code was changed. and the input data is a text file
from sqlite dump.
Input line : "999949|4217|0||1211920741.790266.26733.816999|0|Subject:cp949:Y
From:cp949:Y To:cp949:Y Cc::N Bcc::N ReplyTo::Y|..."
Map:
public void map(LongWritable key, Text value,
OutputCollector<Text, Text> output, Reporter reporter)
throws IOException {
if (table == null)
throw new IOException("table is null");
String[] splits = value.toString().split("[|]");
BatchUpdate update = new BatchUpdate(Bytes.toBytes(Integer
.parseInt(splits[0])));
if (splits.length == 31) {
for (int i = 0; i < splits.length; i++) {
if (!splits[i].equals("")) {
update.put(TEXT + fields[i], Bytes.toBytes(splits[i]));
}
}
table.commit(update);
}
}
On Thu, Nov 20, 2008 at 3:53 PM, ROL <[EMAIL PROTECTED]> wrote:
> Hi
>
> Can you show source?
>
>> While job running, I scanned that table at the same time.
>
> --
> С уважением,
> ROL mailto:[EMAIL PROTECTED]
>
>
--
Best Regards, Edward J. Yoon @ NHN, corp.
[EMAIL PROTECTED]
http://blog.udanax.org