本文整理了Java中org.apache.hadoop.hbase.client.Put.setId()
方法的一些代码示例,展示了Put.setId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Put.setId()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Put
类名称:Put
方法名:setId
暂无
代码示例来源:origin: apache/hbase
@Test
public void testPutId() {
Put put = new Put(ROW);
Assert.assertNull("Make sure id is null if unset", put.toMap().get("id"));
put.setId("myId");
Assert.assertEquals("myId", put.toMap().get("id"));
}
代码示例来源:origin: larsgeorge/hbase-book
public static void main(String[] args) throws Exception {
// vv FingerprintExample
Put put = new Put(Bytes.toBytes("testrow"));
put.addColumn(Bytes.toBytes("fam-1"), Bytes.toBytes("qual-1"),
Bytes.toBytes("val-1"));
put.addColumn(Bytes.toBytes("fam-1"), Bytes.toBytes("qual-2"),
Bytes.toBytes("val-2"));
put.addColumn(Bytes.toBytes("fam-2"), Bytes.toBytes("qual-3"),
Bytes.toBytes("val-3"));
String id = String.format("Hostname: %s, App: %s",
InetAddress.getLocalHost().getHostName(),
System.getProperty("sun.java.command"));
put.setId(id);
System.out.println("Put.size: " + put.size());
System.out.println("Put.id: " + put.getId());
System.out.println("Put.fingerprint: " + put.getFingerprint());
System.out.println("Put.toMap: " + put.toMap());
System.out.println("Put.toJSON: " + put.toJSON());
System.out.println("Put.toString: " + put.toString());
// ^^ FingerprintExample
}
}
代码示例来源:origin: org.apache.hbase/hbase-client
@Test
public void testPutId() {
Put put = new Put(ROW);
Assert.assertNull("Make sure id is null if unset", put.toMap().get("id"));
put.setId("myId");
Assert.assertEquals("myId", put.toMap().get("id"));
}
代码示例来源:origin: caskdata/cdap
@Override
public PutBuilder setId(String id) {
put.setId(id);
return this;
}
}
代码示例来源:origin: co.cask.cdap/cdap-hbase-compat-base
@Override
public PutBuilder setId(String id) {
put.setId(id);
return this;
}
代码示例来源:origin: cdapio/cdap
@Override
public PutBuilder setId(String id) {
put.setId(id);
return this;
}
}
代码示例来源:origin: cdapio/cdap
@Override
public PutBuilder setId(String id) {
put.setId(id);
return this;
}
代码示例来源:origin: cdapio/cdap
@Override
public PutBuilder setId(String id) {
put.setId(id);
return this;
}
}
代码示例来源:origin: apache/streams
return;
put.setId(GuidUtils.generateGuid(node.toString()));
try {
byte[] value = node.binaryValue();
内容来源于网络,如有侵权,请联系作者删除!