关于hadoop winutils.exe

时间:2018-08-09 09:00:44

标签: windows hadoop 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上运行 如何预防呢?

0 个答案:

没有答案