[ 
https://issues.apache.org/jira/browse/PIG-3623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rohini Palaniswamy updated PIG-3623:
------------------------------------

    Fix Version/s: 0.13.0
           Status: Patch Available  (was: Open)

bq. And if we don't make loadKey and noWal arguments optional (that is if we 
make 2nd argument of addOption true) then old code that doesn't specify 
true|false breaks 
   validOptions_.addOption("loadKey", false, "Load Key");
   if ("true".equalsIgnoreCase(value) || value == null) {//the null check is 
for backward compat.

Just realized that -loadKey and -noWAL were command line switches/flags instead 
of options which take arguments even though the document said otherwise. Seeing 
the code for ignoreWhitespace which takes argument value, I had just assumed 
that -loadKey and -noWAL also took argument  but was not honoring those 
argument values. Wish all of them were consistent. Changing documentation now 
to say that they are only flags will still make people looking at older release 
documentation make mistakes or will have them confuse with -ignoreWhiteSpace 
and -cacheBlocks which always take arguments. Your patch takes care of it both 
ways (either as flag or as an option taking argument). So I guess we are good. 
Patch looks good as well. 

TestHBaseStorage fails for me as well. When doing svn up -r 1553724 which is 
the last checkin in 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java,
 the tests pass. Initially thought it was due to PIG-3573 changing zookeeper 
version to 3.4.5, but even reverting it to 3.4.4 the tests fail.  Will commit 
once I figure out the cause of the failure.

> HBaseStorage: setting loadKey and noWAL to false doesn't have any affect
> ------------------------------------------------------------------------
>
>                 Key: PIG-3623
>                 URL: https://issues.apache.org/jira/browse/PIG-3623
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.12.0
>            Reporter: Michael Stefaniak
>            Assignee: Nezih Yigitbasi
>             Fix For: 0.13.0
>
>         Attachments: PIG-3623.1.patch, PIG-3623.2.patch, PIG-3623.patch
>
>
> The documentation for HBaseStorage 
> (http://pig.apache.org/docs/r0.12.0/func.html#HBaseStorage)
> says -loadKey=(true|false) Load the row key as the first value in every tuple 
> returned from HBase (default=false)
> However, looking at the source 
> (http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java)
> it is just doing a check for the existence of this option
> loadRowKey_ = configuredOptions_.hasOption("loadKey");
> So setting -loadKey=false in the options string, still results in a true value



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to