org.apache.hadoop.hbase.client.Put.setId()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中org.apache.hadoop.hbase.client.Put.setId()方法的一些代码示例,展示了Put.setId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Put.setId()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Put
类名称:Put
方法名:setId

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();

相关文章