我正在尝试远程连接到accumulo示例,我用maven启动了一个项目,并添加了所有需要的库,在这段代码中,我正在设置连接的参数:
public class App{
public static void main(String [] argv){
HashMap<String,String> parametres=new HashMap<>();
parametres.put("accumulo.instance.id","******");
parametres.put("accumulo.zookeepers","accumulo-do");
parametres.put("accumulo.user","root");
parametres.put("accumulo.password","****");
parametres.put("accumulo.catalog","*******");
try
{
DataStore dataStore= DataStoreFinder.getDataStore(parametres);
System.out.println("Succés");
}catch (Exception e){
System.out.println("Exception de Accumulo");
System.out.println(e);
}
}
}
但是我试着运行它我得到了一个错误:
> Unable to load native-hadoop library for your platform... using builtin-java >classes where applicable
>Failed to locate the winutils binary in the hadoop binary path
>java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:355)
at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:370)
at org.apache.hadoop.util.Shell.<clinit>(Shell.java:363)
at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:79)
at org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:116)
at org.apache.hadoop.security.Groups.<init>(Groups.java:93)
at org.apache.hadoop.security.Groups.<init>(Groups.java:73)
at >org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:293)
at >org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:283)
at >org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:260)
at >org.apache.hadoop.security.UserGroupInformation.isAuthenticationMethodEnabled(UserGroupInformation.java:337)
at >org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:331)
at >org.locationtech.geomesa.accumulo.data.AccumuloDataStore.liftedTree1$1(AccumuloDataStore.scala:66)
> at org.locationtech.geomesa.accumulo.data.AccumuloDataStore.<init>(AccumuloDataStore.scala:65)
> at >org.locationtech.geomesa.accumulo.data.AccumuloDataStoreFactory.createDataStore(>AccumuloDataStoreFactory.scala:50)
> at >org.locationtech.geomesa.accumulo.data.AccumuloDataStoreFactory.createDataStore(>AccumuloDataStoreFactory.scala:37)
> at >org.geotools.data.DataAccessFinder.getDataStore(DataAccessFinder.java:130)
> at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:89)
> at test.App.main(App.java:48)
你能告诉我这个错误的原因吗?我不是在windows上使用hadoop,我的hadoop集群是在linux上运行的,如何防止这种情况?
暂无答案!
目前还没有任何答案,快来回答吧!