eclipse中运行hbase时不能显示表中的值

时间:2022-05-06
本文章向大家介绍eclipse中运行hbase时不能显示表中的值,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
  for(Result row:table.getScanner("fam1".getBytes())){  
   //    System.out.format("ROWn", new String(row.getRow()));//attention:the format can't be used.  
  System.out.println("ROWt"+new String(row.getRow()));  
  for(Map.Entry<byte[], byte[]>entry:row.getFamilyMap("fam1".getBytes()).entrySet()){  
  String column=new String(entry.getKey());  
  String value=new String(entry.getValue());  
   //    System.out.format("COLUMN ", column, value);//attention:the format can't be used.  
  System.out.println(column+" + "+value);  
  }  
  }  

在输出时不能用System.out.format而要用System.out.println。