hadoop study notes, myeclipse configuration

Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

The reason and the code are to find out the problem of HADOOP_HOME. If HADOOP_HOME is empty, fullExeName must be null\bin\winutils.exe. The solution is very simple, just configure the environment variables obediently. If you don't want to restart the computer, you can add System.setProperty("hadoop.home.dir", "..."); to the MapReduce program; slow down for the time being, the environment variable is that configuration jdk place In


general projects, log4j should be added to facilitate troubleshooting

org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=Administrator, access=WRITE, inode="/ user/root":root:supergroup:drwxr-xr-x

has no permission on this file, the default is the computer name admin, but the hadoop account is root, or root, you need to change the permission ./hadoop fs -chmod 777 file name
final To sum up, there are three possible solutions:
1. Add HADOOP_USER_NAME to the system environment variable or Java JVM variable. The value of this value depends on your own situation. You will run the Linux user name on HADOOP in the future. (Restart eclipse after the modification, otherwise it may not take effect)
2. Change the account of the current system to hadoop
3. Use the command line interface of HDFS to modify the permissions of the corresponding directory, hadoop fs -chmod 777 /user, the latter /user is the path to upload the file, which may be different in different situations, for example, the path of the file to be uploaded is hdfs:/ /namenode/user/xxx.doc, then such modification can be done. If the path of the file to be uploaded is hdfs://namenode/java/xxx.doc, the modification to be made is hadoop fs -chmod 777 /java or hadoop fs - chmod 777 /, the java one needs to create a Java directory in HDFS first, and the latter one is to adjust the permissions for the root directory.

4. Right-click Computer-->Administration-->Users and Groups-->admin. . . Change to the same as the cluster host name under Linux The
first method has been verified

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326848773&siteId=291194637