2016-02-12 9 views
0

如何從運行在linux系統和java progamme上的Hbase表中獲取數據在窗口中運行無法找到可執行空\ BIN \如何從Linux系統上運行的Hbase表中獲取數據以及在窗口上運行的java程序無法找到可執行文件null bin

// 這是我的代碼連接

Configuration conf = HBaseConfiguration.create(); 
conf.set("hbase.zookeeper.quorum", "192.168.20.129"); 
conf.set("hbase.zookeeper.property.clientPort", "2181"); 
conf.set("hbase.master", "192.168.20.129:60010"); 

回答

0

只需添加這種方法,連接之前調用。

private static void workaround() { 
     //workaround for = java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries. 
     File workaround = new File("."); 
     System.getProperties().put("hadoop.home.dir", workaround.getAbsolutePath()); 
     new File("./bin").mkdirs(); 
     try { 
      new File("./bin/winutils.exe").createNewFile(); 
     } catch (IOException e) { 
      logger.error(e); 
     } 
    } 
+0

你能寫出整個代碼從linux hbase表中獲取數據到窗口java類 – user3090661

+0

這就是你的問題的答案。我無法爲您編寫該代碼,您可以在互聯網上輕鬆找到該代碼。 – halil

相關問題