Java 类org.apache.hadoop.hbase.io.HbaseMapWritable 实例源码

项目:LCIndex-HBase-0.94.16    文件:TestSerialization.java   
@SuppressWarnings("unchecked")
@Test public void testHbaseMapWritable() throws Exception {
  HbaseMapWritable<byte [], byte []> hmw =
    new HbaseMapWritable<byte[], byte[]>();
  hmw.put("key".getBytes(), "value".getBytes());
  byte [] bytes = Writables.getBytes(hmw);
  hmw = (HbaseMapWritable<byte[], byte[]>)
    Writables.getWritable(bytes, new HbaseMapWritable<byte [], byte []>());
  assertTrue(hmw.size() == 1);
  assertTrue(Bytes.equals("value".getBytes(), hmw.get("key".getBytes())));
}
项目:IRIndex    文件:TestSerialization.java   
@SuppressWarnings("unchecked")
@Test public void testHbaseMapWritable() throws Exception {
  HbaseMapWritable<byte [], byte []> hmw =
    new HbaseMapWritable<byte[], byte[]>();
  hmw.put("key".getBytes(), "value".getBytes());
  byte [] bytes = Writables.getBytes(hmw);
  hmw = (HbaseMapWritable<byte[], byte[]>)
    Writables.getWritable(bytes, new HbaseMapWritable<byte [], byte []>());
  assertTrue(hmw.size() == 1);
  assertTrue(Bytes.equals("value".getBytes(), hmw.get("key".getBytes())));
}
项目:HBase-Research    文件:TestSerialization.java   
@SuppressWarnings("unchecked")
@Test public void testHbaseMapWritable() throws Exception {
  HbaseMapWritable<byte [], byte []> hmw =
    new HbaseMapWritable<byte[], byte[]>();
  hmw.put("key".getBytes(), "value".getBytes());
  byte [] bytes = Writables.getBytes(hmw);
  hmw = (HbaseMapWritable<byte[], byte[]>)
    Writables.getWritable(bytes, new HbaseMapWritable<byte [], byte []>());
  assertTrue(hmw.size() == 1);
  assertTrue(Bytes.equals("value".getBytes(), hmw.get("key".getBytes())));
}
项目:hbase-0.94.8-qod    文件:TestSerialization.java   
@SuppressWarnings("unchecked")
@Test public void testHbaseMapWritable() throws Exception {
  HbaseMapWritable<byte [], byte []> hmw =
    new HbaseMapWritable<byte[], byte[]>();
  hmw.put("key".getBytes(), "value".getBytes());
  byte [] bytes = Writables.getBytes(hmw);
  hmw = (HbaseMapWritable<byte[], byte[]>)
    Writables.getWritable(bytes, new HbaseMapWritable<byte [], byte []>());
  assertTrue(hmw.size() == 1);
  assertTrue(Bytes.equals("value".getBytes(), hmw.get("key".getBytes())));
}
项目:hbase-0.94.8-qod    文件:TestSerialization.java   
@SuppressWarnings("unchecked")
@Test public void testHbaseMapWritable() throws Exception {
  HbaseMapWritable<byte [], byte []> hmw =
    new HbaseMapWritable<byte[], byte[]>();
  hmw.put("key".getBytes(), "value".getBytes());
  byte [] bytes = Writables.getBytes(hmw);
  hmw = (HbaseMapWritable<byte[], byte[]>)
    Writables.getWritable(bytes, new HbaseMapWritable<byte [], byte []>());
  assertTrue(hmw.size() == 1);
  assertTrue(Bytes.equals("value".getBytes(), hmw.get("key".getBytes())));
}
项目:hindex    文件:TestSerialization.java   
@SuppressWarnings("unchecked")
@Test public void testHbaseMapWritable() throws Exception {
  HbaseMapWritable<byte [], byte []> hmw =
    new HbaseMapWritable<byte[], byte[]>();
  hmw.put("key".getBytes(), "value".getBytes());
  byte [] bytes = Writables.getBytes(hmw);
  hmw = (HbaseMapWritable<byte[], byte[]>)
    Writables.getWritable(bytes, new HbaseMapWritable<byte [], byte []>());
  assertTrue(hmw.size() == 1);
  assertTrue(Bytes.equals("value".getBytes(), hmw.get("key".getBytes())));
}