without insert method in HTable class

View: New views
3 Messages — Rating Filter:   Alert me  

without insert method in HTable class

by ma qiang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear colleagues:
         I don't know how to insert new rows in a table, and there's
no insert method in HTable class. Can you tell me how to insert some
rows in a  new table?
        Thanks.

Best wishes!

Qiang Ma
Department of Computer Science and Engineering
Fudan University
Shanghai, P. R. China
EMail: maqiang1984@...

Re: without insert method in HTable class

by edward yoon-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try like this :

  HTable table = new HTable(conf, Text tableName);
  long lockId = table.startUpdate(getRow());

  table.put(lockId, Text columnName, byte[] value);
  table.commit(lockId);

On 1/20/08, ma qiang <maqiang1984@...> wrote:

> Dear colleagues:
>         I don't know how to insert new rows in a table, and there's
> no insert method in HTable class. Can you tell me how to insert some
> rows in a  new table?
>        Thanks.
>
> Best wishes!
>
> Qiang Ma
> Department of Computer Science and Engineering
> Fudan University
> Shanghai, P. R. China
> EMail: maqiang1984@...
>


--
B. Regards,
Edward yoon @ NHN, corp.

Re: without insert method in HTable class

by edward yoon-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try like this:

 HTable table = new HTable(conf, Text tableName);
 long lockId = table.startUpdate(Text row);

 table.put(lockId, Text columnName, byte[] value);
 table.commit(lockId);

On 1/20/08, ma qiang <maqiang1984@...> wrote:

> Dear colleagues:
>         I don't know how to insert new rows in a table, and there's
> no insert method in HTable class. Can you tell me how to insert some
> rows in a  new table?
>        Thanks.
>
> Best wishes!
>
> Qiang Ma
> Department of Computer Science and Engineering
> Fudan University
> Shanghai, P. R. China
> EMail: maqiang1984@...
>


--
B. Regards,
Edward yoon @ NHN, corp.