Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to insert the data in HBase table?

  • Sample code Segment
    Configuration config = HBaseConfiguration.create();
    HBaseAdmin h1 = new HBaseAdmin(config);
    HTableDescriptor h2 = new HTableDescriptor(“tablename”);
    h2.addFamily(new HColumnDescriptor(“columnfamily”));
    h1.createTable(h2);
    HTable table=new HTable(config, “tablename”);
    Put p=new Put(rowname);
    P.add(columnfamily,columnname,columnvalue);
    table.put(p);
  • Command
    hbase< put ‘tablename’, ‘rowname’, ‘columnfamily:columnname’, ‘columnvalue’