hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-82) row keys should be array of bytes with a specified comparator
Date Tue, 13 May 2008 05:30:56 GMT

    [ https://issues.apache.org/jira/browse/HBASE-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596281#action_12596281

stack commented on HBASE-82:

Here are more commit comments.  Above was for test changes.  Below is for about half of the
code changes.

M  src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
    Replace Text with byte arrays. 
    Set the defaults into data members.
    Add constructors that take Text and String. 
    Auto-migrate older versions.
    (stripColon, isLegalFamilyName): Added.
M  src/java/org/apache/hadoop/hbase/HMerge.java
    Replace Text with byte arrays. 
M  src/java/org/apache/hadoop/hbase/HStoreKey.java
    Replace Text with byte arrays. 
    Allow passing of Text or String as well as byte [] for row and column. 
    When you ask for qualifier or family, it returns new byte [] with the
    asked for column portion.
M  src/java/org/apache/hadoop/hbase/HConstants.java
    Replace Text with byte arrays. 
    Added some constants and capitalized root and meta regions.
M  src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
M  src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java
M  src/java/org/apache/hadoop/hbase/regionserver/HLogEdit.java
M  src/java/org/apache/hadoop/hbase/regionserver/HLogKey.java
M  src/java/org/apache/hadoop/hbase/regionserver/Memcache.java
M  src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java
M  src/java/org/apache/hadoop/hbase/regionserver/HStoreScanner.java
M  src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
M  src/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
M  src/java/org/apache/hadoop/hbase/regionserver/HLog.java
M  src/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
M  src/java/org/apache/hadoop/hbase/regionserver/RegionUnavailableListener.java
M  src/java/org/apache/hadoop/hbase/rest/TableHandler.java
M  src/java/org/apache/hadoop/hbase/rest/ScannerHandler.java
M  src/java/org/apache/hadoop/hbase/rest/GenericHandler.java
M  src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
M  src/java/org/apache/hadoop/hbase/hql/DeleteCommand.java
M  src/java/org/apache/hadoop/hbase/hql/CreateCommand.java
M  src/java/org/apache/hadoop/hbase/hql/InsertCommand.java
M  src/java/org/apache/hadoop/hbase/hql/AlterCommand.java
M  src/java/org/apache/hadoop/hbase/hql/SelectCommand.java
M  src/java/org/apache/hadoop/hbase/hql/SchemaModificationCommand.java
M  src/java/org/apache/hadoop/hbase/hql/TruncateCommand.java
    Replace Text with byte arrays. 
M  src/java/org/apache/hadoop/hbase/regionserver/HStoreFile.java
    Replace Text with byte arrays. 
    Encoded name is now an int. 
    (createHStoreFilename): Moved common file creating code here.
    (getFamilySubDir): Added.
M  src/java/org/apache/hadoop/hbase/regionserver/HStore.java
    Replace Text with byte arrays. 
    Changed timesSeen so it starts over at 0 instead of at 1.
M  src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    Replace Text with byte arrays. 
    Changed logging of messages so logs the way master does reporting
    the message type using HMsg.toString().
    Changed key for maps like onlineRegions so instead of region name,
    instead its the hash of the name byte array.
    (getOnlineRegions) Returns Collection instead of Map. 
M  src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    Replace Text with byte arrays. 
    Removed rows to locks.  Insteads, just have locks to rows and have
    the key made of the row hash.
M  src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    Replace Text with byte arrays. 
    Give default values to data members.  Allow constructors take
    String or Text and byte arrays. 
    Changed the check on table name so user tables can't have a dot in them.
    (isLegalTableName): Added.
    (getNameAsString): Added.
M  src/java/org/apache/hadoop/hbase/filter/WhileMatchRowFilter.java
M  src/java/org/apache/hadoop/hbase/filter/StopRowFilter.java
M  src/java/org/apache/hadoop/hbase/filter/InclusiveStopRowFilter.java
M  src/java/org/apache/hadoop/hbase/filter/RegExpRowFilter.java
M  src/java/org/apache/hadoop/hbase/filter/RowFilterSet.java
M  src/java/org/apache/hadoop/hbase/filter/PageRowFilter.java
M  src/java/org/apache/hadoop/hbase/filter/RowFilterInterface.java
M  src/java/org/apache/hadoop/hbase/master/MetaScanner.java
M  src/java/org/apache/hadoop/hbase/master/ProcessServerShutdown.java
M  src/java/org/apache/hadoop/hbase/master/ServerManager.java
    Replace Text with byte arrays.
M  src/java/org/apache/hadoop/hbase/HRegionInfo.java
    Replace Text with byte arrays.
    Changed encoded name to return int rather than String.
    Added constructors that take Text and String.
    (createRegionName): Added.
    (getRegionNameAsString): Added.
M  src/java/org/apache/hadoop/hbase/master/HMaster.java
    Replace Text with byte arrays.
    (tableInCreation): Removed. Unused.

> row keys should be array of bytes with a specified comparator
> -------------------------------------------------------------
>                 Key: HBASE-82
>                 URL: https://issues.apache.org/jira/browse/HBASE-82
>             Project: Hadoop HBase
>          Issue Type: Wish
>            Reporter: Jim Kellerman
>            Assignee: stack
>             Fix For: 0.2.0
>         Attachments: 82-v2.patch, 82-v3.patch, 82-v4.patch, 82-v5.patch, 82-v7.patch,
82-v8.patch, 82-v9-ignore-ws.patch, 82.patch, Perf.java
> I have heard from several people that row keys in HBase should be less restricted than
> What do you think?
> At the very least, a row key has to be a WritableComparable. This would lead to the most
general case being either hadoop.io.BytesWritable or hbase.io.ImmutableBytesWritable. The
primary difference between these two classes is that hadoop.io.BytesWritable by default allocates
100 bytes and if you do not pay attention to the length, (BytesWritable.getSize()), converting
a String to a BytesWritable and vice versa can become problematic. 
> hbase.io.ImmutableBytesWritable, in contrast only allocates as many bytes as you pass
in and then does not allow the size to be changed.
> If we were to change from Text to a non-text key, my preference would be for ImmutableBytesWritable,
because it has a fixed size once set, and operations like get, etc do not have to something
like System.arrayCopy where you specify the number of bytes to copy.
> Your comments, questions are welcome on this issue. If we receive enough feedback that
Text is too restrictive, we are willing to change it, but we need to hear what would be the
most useful thing to change it to as well.

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

View raw message