You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Kyle Oba (JIRA)" <ji...@apache.org> on 2009/12/28 01:10:29 UTC

[jira] Created: (HBASE-2071) Order matters when adding columns to a scan, using some of the add column methods.

Order matters when adding columns to a scan, using some of the add column methods.
----------------------------------------------------------------------------------

                 Key: HBASE-2071
                 URL: https://issues.apache.org/jira/browse/HBASE-2071
             Project: Hadoop HBase
          Issue Type: Bug
          Components: client
    Affects Versions: 0.20.2
         Environment: Calling the Java API, using Clojure 1.1 alpha.  Client machine is a Mac OSX 10.6, using HBase server in non-distributed mode (locally).
            Reporter: Kyle Oba
            Priority: Minor


When adding columns to a Scan, using "addColumns" or "addColumn" (with single argument) the order in which they are added matters.  When adding columns as distinct family and qualifier (2 arguments) this is not a problem.  It is only a problem when adding as a single argument.

For example:
user> (scan "t1" {:columns [ "f1:" "f1:hello" ] })
cols are: [f1: f1:hello]
col: f1:  --  
col: f1:hello  --  world

user> (scan "t1" {:columns [ "f1:hello" "f1:" ] })
cols are: [f1:hello f1:]
col: f1:hello  --  world
col: f1:  --  v1

In the first call to "scan," the arguments are in lexicographic order, and this results in the value associated with "f1" to be left out.  In the second call to "scan," the arguments are in reverse order, and the results are valid.

Sorry the example is in Clojure.  In essence, this is what's happending:

This doesn't work:
myScan.addColumn("f1:")
myScan.addColumn("f1:hello")

This works:
myScan.addColumn("f1:hello")
myScan.addColumn("f1:")

I have omitted the code which creates a scanner with this scan, returns the results, and then prints them.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.