avast / hdfs-shell

HDFS Shell is a HDFS manipulation tool to work with functions integrated in Hadoop DFS
Apache License 2.0
150 stars 33 forks source link

Doesn't work on macOS High Sierra #4

Closed simonrouse9461 closed 7 years ago

simonrouse9461 commented 7 years ago

Here's the exception thrown when I run hdfs-shell.sh.

Exception in thread "main" java.lang.ExceptionInInitializerError at org.apache.hadoop.util.StringUtils.(StringUtils.java:79) at org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:104) at org.apache.hadoop.security.Groups.(Groups.java:86) at org.apache.hadoop.security.Groups.(Groups.java:66) at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280) at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:271) at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:248) at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:763) at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:748) at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:621) at org.apache.hadoop.fs.FileSystem$Cache$Key.(FileSystem.java:2753) at org.apache.hadoop.fs.FileSystem$Cache$Key.(FileSystem.java:2745) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2611) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:169) at com.avast.server.hdfsshell.commands.ContextCommands.getFileSystem(ContextCommands.java:108) at com.avast.server.hdfsshell.commands.ContextCommands.getCurrentDir(ContextCommands.java:76) at com.avast.server.hdfsshell.ui.ShellPromptProvider.getPrompt(ShellPromptProvider.java:47) at org.springframework.shell.core.JLineShellComponent.getPromptText(JLineShellComponent.java:181) at org.springframework.shell.core.JLineShellComponent.customizePlugin(JLineShellComponent.java:149) at org.springframework.shell.core.JLineShellComponent.start(JLineShellComponent.java:79) at org.mvnsearch.spring.boot.shell.BootShim.run(BootShim.java:85) at org.mvnsearch.spring.boot.shell.SpringShellApplication.run(SpringShellApplication.java:87) at org.mvnsearch.spring.boot.shell.SpringShellApplication.run(SpringShellApplication.java:37) at com.avast.server.hdfsshell.MainApp.main(MainApp.java:14) Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3116) at java.base/java.lang.String.substring(String.java:1885) at org.apache.hadoop.util.Shell.(Shell.java:49) ... 25 more

Vity01 commented 7 years ago

It's a Hadoop problem - see https://issues.apache.org/jira/browse/HADOOP-14586 You should try to run it with JDK8 or rebuild hdfs-shell with another (higher) Hadoop version.