Package util

Examples of util.HBaseHelper.dump()


      put.add(COLFAM1, QUAL1, count, Bytes.toBytes("val-" + count)); // co DeleteTimestampExample-2-Add The version is set to a specific value, using the loop variable.
      table.put(put);
    }
    // ^^ DeleteTimestampExample
    System.out.println("After put calls...");
    helper.dump("testtable", new String[] { "row1" }, null, null);
//    admin.flush("testtable");
//    Thread.sleep(3000);
//    admin.majorCompact("testtable");
//    Thread.sleep(3000);
    // vv DeleteTimestampExample
View Full Code Here


    delete.deleteColumn(COLFAM1, QUAL1, 6);
    table.delete(delete);
    // ^^ DeleteTimestampExample

    System.out.println("After delete call...");
    helper.dump("testtable", new String[]{ "row1" }, null, null);
  }
}
View Full Code Here

      new String[]{"colfam1", "colfam2"},
      new String[]{"qual1", "qual1"},
      new long[]{1, 2},
      new String[]{"val1", "val2"});
    System.out.println("Before endpoint call...");
    helper.dump("testtable",
      new String[]{"row1", "row2", "row3", "row4", "row5"},
      null, null);
    HBaseAdmin admin = new HBaseAdmin(conf);
    try {
      admin.split("testtable", "row3");
View Full Code Here

      thread.join();
    } catch (InterruptedException e) {
      // ignore
    }
    System.out.println("After thread ended...");
    helper.dump("testtable", new String[]{ "row1" }, null, null);
  }
}
View Full Code Here

      new String[] { "colfam1", "colfam2" },
      new String[] { "qual1", "qual1", "qual2", "qual2", "qual3", "qual3" },
      new long[]   { 1, 2, 3, 4, 5, 6 },
      new String[] { "val1", "val2", "val3", "val4", "val5", "val6" });
    System.out.println("Before delete call...");
    helper.dump("testtable", new String[]{ "row1", "row2", "row3" }, null, null);

    List<Delete> deletes = new ArrayList<Delete>();

    Delete delete1 = new Delete(Bytes.toBytes("row1"));
    delete1.setTimestamp(4);
View Full Code Here

    for (Delete delete : deletes) {
      System.out.println(delete); // co DeleteListErrorExample-5-Dump Print out failed delete for debugging purposes.
    }
    // ^^ DeleteListErrorExample
    System.out.println("After delete call...");
    helper.dump("testtable", new String[]{ "row1", "row2", "row3" }, null, null);
  }
}
View Full Code Here

    HBaseHelper helper = HBaseHelper.getHelper(conf);
    helper.dropTable("testtable");
    helper.createTable("testtable", "colfam1");
    helper.put("testtable", "row1", "colfam1", "qual1", 1L, "val1");
    System.out.println("Before batch call...");
    helper.dump("testtable", new String[] { "row1" }, null, null);

    HTable table = new HTable(conf, "testtable");

    // vv BatchSameRowExample
    List<Row> batch = new ArrayList<Row>();
View Full Code Here

    for (int i = 0; i < results.length; i++) {
      System.out.println("Result[" + i + "]: " + results[i]);
    }
    System.out.println("After batch call...");
    helper.dump("testtable", new String[]{ "row1" }, null, null);
  }
}
View Full Code Here

      new String[] { "colfam1", "colfam2" },
      new String[] { "qual1", "qual1", "qual2", "qual2", "qual3", "qual3" },
      new long[]   { 1, 2, 3, 4, 5, 6 },
      new String[] { "val1", "val2", "val3", "val4", "val5", "val6" });
    System.out.println("Before delete call...");
    helper.dump("testtable", new String[]{ "row1", "row2", "row3" }, null, null);
    // vv DeleteListExample
    List<Delete> deletes = new ArrayList<Delete>(); // co DeleteListExample-1-CreateList Create a list that holds the Delete instances.

    Delete delete1 = new Delete(Bytes.toBytes("row1"));
    delete1.setTimestamp(4); // co DeleteListExample-2-SetTS Set timestamp for row deletes.
View Full Code Here

    table.delete(deletes); // co DeleteListExample-7-DoDel Delete the data from multiple rows the HBase table.

    table.close();
    // ^^ DeleteListExample
    System.out.println("After delete call...");
    helper.dump("testtable", new String[]{ "row1", "row2", "row3" }, null, null);
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.