[
https://issues.apache.org/jira/browse/PHOENIX-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14367827#comment-14367827
]
maghamravikiran commented on PHOENIX-1653:
------------------------------------------
Hi [~gabriel.reid]
Thanks for taking time to re-base the patch. Sorry for the delay in having
a look at it. Barring the below minor issue everything else looks good to me.
Issue:
a) I believe you are missing a negation check on containsKey method .
Without that, we will be missing entries of Configuration argument and only
replace values for those entries that exist in both the passed in arguments.
{code}
/**
* Add properties from the given Configuration to the provided Properties.
*
* @param props properties to which connection information from the
Configuration will be added
* @param conf configuration containing connection information
* @return the input Properties value, with additional connection
information from the
* given Configuration
*/
private static Properties extractProperties(Properties props, final
Configuration conf) {
Iterator<Map.Entry<String, String>> iterator = conf.iterator();
if(iterator != null) {
while (iterator.hasNext()) {
Map.Entry<String, String> entry = iterator.next();
// RAVI: we need to have a negation check here
to ensure all entries of conf are copied over to props.
if (props.containsKey(entry.getKey())) {
props.setProperty(entry.getKey(), entry.getValue());
}
}
}
return props;
}
{code}
> Allow option to pass peer zookeeper address to load data into a target
> cluster in Map Reduce api
> ------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-1653
> URL: https://issues.apache.org/jira/browse/PHOENIX-1653
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.0.0
> Reporter: maghamravikiran
> Labels: newbie, patch
> Attachments: PHOENIX-1653.patch, PHOENIX-1653v2.patch,
> PHOENIX-1653v3.patch, PHOENIX-1653v4.patch
>
>
> Provide an option to pass the peer zookeeper address within a MapReduce job
> where PhoenixInputFormat reads from one HBase cluster, and
> PhoenixOutputFormat writes to a different cluster.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)