How do i fix hadoop error when Username has a space in it?

20 views Asked by At

So I am currently using hadoop-3.3.6 on windows, and I am getting an error that stems from the fact that Hadoop creates a tmp folder and inside it there is the path: C:\tmp\hadoop-Lenovo I7 and C:\tmp\hadoop-Lenovo I7\nm-local-dir\usercache\Lenovo I7, Lenovo I7 is my user name in windows, but Hadoop cannot read paths with spaces in them, so is there a way to fix this issue with my user name and set it to something else?

putting this code in core-site.xml fixes the first link C:\tmp\hadoop-Lenovo I7

<property>
    <name>hadoop.tmp.dir</name>
    <value>/tmp/hadoop</value>
 </property>

But it does not change the second link: C:\tmp\hadoop-Lenovo I7\nm-local-dir\usercache\Lenovo I7, it just changes to C:\tmp\hadoop\nm-local-dir\usercache\Lenovo I7, but that last folder still stays the same, I have tried stuff like this to change that route specifically

<property>
    <name>hadoop.nm-local-dir</name>
    <value>C:\tmp\hadoop\nm-local-dir</value>
</property>
<property>
    <name>hadoop.usercache.dir</name>
    <value>C:\tmp\hadoop\nm-local-dir\usercache\Lenovo</value>
</property>

or this:

<property>
    <name>yarn.nodemanager.local-cache.root-dir</name>
    <value>/tmp/hadoop/nm-local-dir/usercache</value>
</property>
<property>
    <name>yarn.nodemanager.local-cache.usercache.user-name</name>
    <value>Usuario</value>
</property>

but it doesn't work, it could be something along these line but I could also be by changing something so that Hadoop gets my user name as something else but I don't know how to do so.

0

There are 0 answers