Examples of newHBatch()


Examples of org.apache.hadoop.hbase.hbql.client.HConnection.newHBatch()

    public static void main(String[] args) throws HBqlException {

        HConnection conn = HConnectionManager.newConnection();

        final HBatch<TestObject> batch = conn.newHBatch();
        for (int i = 0; i < 10; i++)
            batch.insert(new TestObject(i));

        batch.apply();
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.HConnection.newHBatch()

        HRecord rec = conn.getMapping("fooMapping").newHRecord();
        rec.setCurrentValue("keyval", Util.getZeroPaddedNonNegativeNumber(2, 10));
        rec.setCurrentValue("val1", 123);
        rec.setCurrentValue("al2", "testval");

        HBatch<HRecord> batch = conn.newHBatch();
        batch.insert(rec);
        batch.apply();

        // END SNIPPET: insert1
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.HConnection.newHBatch()

            stmt.setParameter("val2", i);
            stmt.execute();
        }

        // Add some other records using the Record interface
        final HBatch<HRecord> batch = conn.newHBatch();
        for (int i = 5; i < 10; i++) {
            HRecord rec = conn.getMapping("demo1").newHRecord();
            rec.setCurrentValue("keyval", Util.getZeroPaddedNonNegativeNumber(i, 10));
            rec.setCurrentValue("val1", "Value: " + i);
            rec.setCurrentValue("f1:val2", i);
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.HConnection.newHBatch()

            stmt.setParameter("val2", i);
            stmt.execute();
        }

        // Add some other records using an AnnotatedExample object
        final HBatch<AnnotatedExample> batch = conn.newHBatch();
        for (int i = 5; i < 10; i++) {
            AnnotatedExample obj = new AnnotatedExample();
            obj.keyval = Util.getZeroPaddedNonNegativeNumber(i, 10);
            obj.val1 = "Value: " + i;
            obj.val2 = i;
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.