[
https://issues.apache.org/jira/browse/PIG-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396445#comment-13396445
]
fang fang chen commented on PIG-2753:
-------------------------------------
The same situation also happened in following code from class
org.apache.pig.backend.hadoop.hbase.HBaseStorage:
public void setStoreLocation(String location, Job job) throws IOException {
if (location.startsWith("hbase://")){
job.getConfiguration().set(TableOutputFormat.OUTPUT_TABLE,
location.substring(8));
}else{
job.getConfiguration().set(TableOutputFormat.OUTPUT_TABLE,
location);
}
String serializedSchema =
getUDFProperties().getProperty(contextSignature + "_schema");
if (serializedSchema!= null) {
schema_ = (ResourceSchema)
ObjectSerializer.deserialize(serializedSchema);
}
m_conf =
HBaseConfiguration.addHbaseResources(job.getConfiguration());// This will
overwrite the original correct configuration from job.xml
}
> In distributed mapreduce mode, pig can not get correct hbase configuration
> --------------------------------------------------------------------------
>
> Key: PIG-2753
> URL: https://issues.apache.org/jira/browse/PIG-2753
> Project: Pig
> Issue Type: Bug
> Components: piggybank, site
> Affects Versions: 0.9.1
> Environment: OS:Red Hat Enterprise Linux Server release 5.5 (Tikanga)
>
> Reporter: fang fang chen
> Assignee: fang fang chen
>
> Hadoop/Hbase/Zookeeper/pig node distribution:
> hadoop nodes: {node1=[namenode, secondarynamenode, jobtracker],
> node2=[datanode, tasktracker]}
> hbase nodes: {node1=[master, regionserver]}
> pig nodes: {node1, node2}
> zookeeper nodes: {node1}
> Operate hbase table in node1 pig shell like:
> test = LOAD 'hbase://table' USING
> org.apache.pig.backend.hadoop.hbase.HBaseStorage( 'd:sWords','-loadKey true')
> AS (ID: bytearray , Words:chararray );
> result = FOREACH test GENERATE ID, com.pig.test(Words);
> --result = FOREACH AA GENERATE com.pig.test(Words), ID;
> --dump result;
> store result into 'table' using
> org.apache.pig.backend.hadoop.hbase.HBaseStorage('d:drools_cat');
> --store result into 'AA_10_categs' using
> org.apache.pig.backend.hadoop.hbase.HBaseStorage('d:cat');
> In tasktracker node, pig can not read hbase configuration in job.xml.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira