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

2018-03-30 12:01:52 浏览数 (1)

代码语言:javascript复制
  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。

0 人点赞