Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Ba*** about 14 days ago

When I try to run $HIVE_HOME/bin/schematool -dbType derby -initSchema I get no such file or directory exist. But when I go to the exact location with cd and run ls, I see the file there. Also, when I echo HIVE_HOME it return me the exact path.

Add comment

Comments (6)

Raym*** about 7 days ago

You mentioned $HIVE_PATH in one of the previous comments while it should be $HIVE_HOME. Can you please double check that?

Based on what you have described and also if I understand correctly:

Your issue is that you cannot run the following command successfully:

$HIVE_HOME/bin/schematool -dbType derby -initSchema

And you got error: no such file or directory exist.

Usually this issue will happen if:

  • No x permission (execute) for your account on schematool file, which is why I recommended to check that permission and add it if missing.
  • Or as the error message self-described, the path doesn't exist. For example, it may be because your $HIVE_HOME environment variable is not setup correctly. I would recommend to follow the steps below to add it into your .bashrc file and then re-run the schema initialisation command: 

1) Edit file ~/.bashrc by running the following command

vi ~/.bashrc

2) Add the following line at the end of the file:

export HIVE_HOME={your hive home folder path}

3) Source the settings 

source ~/.bashrc

And then run the command:

$HIVE_HOME/bin/schematool -dbType derby -initSchema

If the above suggestions don't work still, I'm not sure whether I can help more unless you provide screenshots about your Cygwin window, hive folder,  and detailed error messages here.

You can upload images in the comment section directly.  Or alternatively, write me an email at enquiry[at]kontext.tech

Ba*** about 8 days ago

So, $HIVE_HOME/bin was in the path. So, I just ran schematool -dbType mysql -initSchema. Also, before that I did hive -service metastore.

Ba*** about 8 days ago

So, $HIVE_HOME/bin was in the path. So, I just ran schematool -dbType mysql -initSchema. Also, before that I did hive -service metastore.

Raym*** about 10 days ago

Can you run the following command in Cygwin to see if the script file is executable?

ls -alt $HIVE_HOME/bin

-rwxr-xr-x+ 1 fahao fahao   832 May 16  2018 metatool

-rwxr-xr-x+ 1 fahao fahao   884 May 16  2018 schematool

The output should look like the above one. 'x' means execution permission. You will need that permission before you can execute the scripts. 

If no permission, please try the following command to add it:

chmod +x $HIVE_HOME/bin/schematool

Ba*** about 11 days ago

Yes, I did. When I go the path from cygwin, and do a ls, I see schematool there. Also when I print $HIVE_PATH and $HADOOP_PATH I get the correct location.

Ba*** about 11 days ago

Yes, I did. When I go the path from cygwin, and do a ls, I see schematool there. Also when I print $HIVE_PATH and $HADOOP_PATH I get the correct location.

Raym*** about 14 days ago

Did you run the command in Cygwin terminal? $HIVE_HOME is the syntax for Linux/UNIX and only works in Cygwin (or other equivalent terminal) in Windows.

Ba*** about 14 days ago

When I try to run $HIVE_HOME/bin/schematool -dbType derby -initSchema I get no such file or directory exist. But when I go to the exact location with cd and run ls, I see the file there. Also, when I echo HIVE_HOME it return me the exact path.

Ba*** about 14 days ago

When I try to run $HIVE_HOME/bin/schematool -dbType derby -initSchema I get no such file or directory exist. But when I go to the exact location with cd and run ls, I see the file there. Also, when I echo HIVE_HOME it return me the exact path.