It seems screenshots are not getting uploaded in the post so, below are the
missed screenshot's content

 

Bashrc file:-

## Set Hadoop-related environment variables

export HADOOP_HOME=/usr/local/hadoop-2.7.3

 

# Set Hive-related environment variables

export HIVE_HOME=/usr/local/hive

 

# Set HCatalog-related environment variables

export HCAT_HOME=/usr/local/hive/hcatalog

 

# Set PIG-related environment variables

export PIG_HOME=/usr/local/pig

 

# Set Derby-related environment variables

export DERBY_HOME=/usr/local/derby

 

#Sqoop

export SQOOP_HOME=/usr/lib/sqoop-1.4.6.bin__hadoop-2.0.4-alpha

 

# Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later
on)

export JAVA_HOME=/home/jdk1.8.0_121

 

# Add Hadoop bin/ directory to PATH

export
PATH=$JAVA_HOME/bin:$HADOOP_HOME/bin:$HIVE_HOME/bin:$DERBY_HOME/bin:$SQOOP_H
OME/bin:$PATH

export PATH=$HCAT_HOME/bin:$PATH

export PATH=$PATH:$PIG_HOME/bin

 

export
CLASSPATH=$CLASSPATH:/usr/local/hive/lib/*:$DERBY_HOME/lib/derby.jar:$DERBY_
HOME/lib/derbytools.jar:.

 

export
PIG_CLASSPATH=$HCAT_HOME/share/hcatalog/hive-hcatalog-core-2.1.1.jar:$HCAT_H
OME/share/hcatalog/hive-hcatalog-pig-adapter-2.1.1.jar:$HIVE_HOME/lib/hive-m
etastore-2.1.1.jar:$HIVE_HOME/lib/libthrift-0.9.3.jar:$HIVE_HOME/lib/hive-ex
ec-2.1.1.jar:$HIVE_HOME/lib/libfb303-0.9.3.jar:$HIVE_HOME/lib/jdo2-api-2.3-e
c.jar:$HIVE_HOME/conf:$HADOOP_HOME/conf:$HADOOP_HOME/share/hadoop/common/lib
/slf4j-api-1.7.10.jar

 

export PIG_OPTS=-Dhive.metastore.uris=thrift://localhost:10000

#export
PIG_CLASSPATH=$HIVE_HOME/conf:$HADOOP_HOME/conf:$HCAT_HOME/share/hcatalog/*:
$HIVE_HOME/lib/*:

#export HADOOP_USER_CLASSPATH_FIRST=true

 

 

 

Error message on console:-

[root@postgres ~]# pig -useHCatalog

ls: cannot access /usr/local/hive/lib/slf4j-api-*.jar: No such file or
directory

ls: cannot access /usr/local/hive/hcatalog/lib/*hbase-storage-handler-*.jar:
No such file or directory

Error: Could not find or load main class
.usr.local.hive.lib.jdo-api-3.0.1.jar,file:..,file:...usr.local.hive.lib.hiv
e-hbase-handler-2.1.1.jar,file:...usr.local.hive.hcatalog.share.hcatalog.hiv
e-hcatalog-core-2.1.1.jar,file:..,file:...usr.local.hive.hcatalog.share.hcat
alog.hive-hcatalog-pig-adapter-2.1.1.jar

 

Please Help me.

 

Thanks,

Jagritee Upadhyay

 

 

From: Jagritee Upadhyay [mailto:jagritee.upadh...@altruistindia.com] 
Sent: Saturday, February 04, 2017 10:58 AM
To: user@pig.apache.org
Cc: JP-Gupta
Subject: Facing issues while configuring hcatalog in PIG

 

Hi Users,

 

I am new to PIG and using "pig-0.16.0".

 

I have a requirement where I have to Access tables managed by "Hive"using
HCatalog. Call it from a PIG script. Make changes to one of the columns and
then save it back in same location using HStore.

For this task I was following steps mentioned in
https://hive.apache.org/javadocs/hcat-r0.5.0/loadstore.html to load
appropriate jars for working with HCatalog.

 

Below is screenshot of my the bashrc file where I have configured all the
needed details for using HCatalog:-

 



 

However after this when I'm trying to run "pig -useHCatalog" in my console
getting errors mentioned in the screenshot below:-

 



 

Please Help me.

 

Thanks,

Jagritee Upadhyay

Altruist Technologies Private Limited.

 

Reply via email to