From a6c6f776126b64c74a6a90684bfd3fc7bca4ffa3 Mon Sep 17 00:00:00 2001 From: Ryan Rawson Date: Mon, 27 Jul 2009 23:48:22 +0000 Subject: [PATCH] HBASE-1714 git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@798334 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../apache/hadoop/hbase/client/Delete.java | 5 + .../hbase/mapred/TableInputFormatBase.java | 16 +- .../hbase/regionserver/DeleteCompare.java | 22 +- .../apache/hadoop/hbase/thrift/Hbase.thrift | 25 +- .../hadoop/hbase/thrift/ThriftServer.java | 22 +- .../hbase/thrift/generated/AlreadyExists.java | 10 +- .../hbase/thrift/generated/BatchMutation.java | 9 +- .../thrift/generated/ColumnDescriptor.java | 10 +- .../hadoop/hbase/thrift/generated/Hbase.java | 917 +++++++++++++++++- .../hbase/thrift/generated/IOError.java | 9 +- .../thrift/generated/IllegalArgument.java | 9 +- .../hbase/thrift/generated/Mutation.java | 9 +- .../hadoop/hbase/thrift/generated/TCell.java | 9 +- .../hbase/thrift/generated/TRegionInfo.java | 9 +- .../hbase/thrift/generated/TRowResult.java | 9 +- .../hadoop/hbase/thrift/TestThriftServer.java | 2 +- 17 files changed, 981 insertions(+), 112 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0d40aebc8ab..3c618fd8055 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -521,6 +521,7 @@ Release 0.20.0 - Unreleased (Tim Sell via Stack) HBASE-1683 OOME on master splitting logs; stuck, won't go down HBASE-1704 Better zk error when failed connect + HBASE-1714 Thrift server: prefix scan API OPTIMIZATIONS HBASE-1412 Change values for delete column and column family in KeyValue diff --git a/src/java/org/apache/hadoop/hbase/client/Delete.java b/src/java/org/apache/hadoop/hbase/client/Delete.java index 30e48a9bcc9..b48f21e6302 100644 --- a/src/java/org/apache/hadoop/hbase/client/Delete.java +++ b/src/java/org/apache/hadoop/hbase/client/Delete.java @@ -228,6 +228,11 @@ public class Delete implements Writable { familyMap.put(family, list); return this; } + + public void deleteColumns(byte [] column) { + byte [][] parts = KeyValue.parseColumn(column); + this.deleteColumns(parts[0], parts[1]); + } /** * Delete the latest version of the specified column, given in diff --git a/src/java/org/apache/hadoop/hbase/mapred/TableInputFormatBase.java b/src/java/org/apache/hadoop/hbase/mapred/TableInputFormatBase.java index 00f74a95b94..6720157454d 100644 --- a/src/java/org/apache/hadoop/hbase/mapred/TableInputFormatBase.java +++ b/src/java/org/apache/hadoop/hbase/mapred/TableInputFormatBase.java @@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.io.RowResult; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.util.Writables; +import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.mapred.InputFormat; import org.apache.hadoop.mapred.InputSplit; import org.apache.hadoop.mapred.JobConf; @@ -106,21 +107,22 @@ implements InputFormat { public void restart(byte[] firstRow) throws IOException { if ((endRow != null) && (endRow.length > 0)) { if (trrRowFilter != null) { - final Set rowFiltersSet = - new HashSet(); - rowFiltersSet.add(new WhileMatchRowFilter(new StopRowFilter(endRow))); - rowFiltersSet.add(trrRowFilter); - Scan scan = new Scan(startRow); + Scan scan = new Scan(firstRow, endRow); scan.addColumns(trrInputColumns); -// scan.setFilter(new RowFilterSet(RowFilterSet.Operator.MUST_PASS_ALL, -// rowFiltersSet)); + scan.setOldFilter(trrRowFilter); this.scanner = this.htable.getScanner(scan); } else { + LOG.debug("TIFB.restart, firstRow: " + + Bytes.toStringBinary(firstRow) + ", endRow: " + + Bytes.toStringBinary(endRow)); Scan scan = new Scan(firstRow, endRow); scan.addColumns(trrInputColumns); this.scanner = this.htable.getScanner(scan); } } else { + LOG.debug("TIFB.restart, firstRow: " + + Bytes.toStringBinary(firstRow) + ", no endRow"); + Scan scan = new Scan(firstRow); scan.addColumns(trrInputColumns); // scan.setFilter(trrRowFilter); diff --git a/src/java/org/apache/hadoop/hbase/regionserver/DeleteCompare.java b/src/java/org/apache/hadoop/hbase/regionserver/DeleteCompare.java index 03cb1896275..29a645e57a8 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/DeleteCompare.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/DeleteCompare.java @@ -1,3 +1,23 @@ +/* + * Copyright 2009 The Apache Software Foundation + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.hadoop.hbase.regionserver; import org.apache.hadoop.hbase.KeyValue; @@ -69,7 +89,6 @@ public class DeleteCompare { if(res > 0) { return DeleteCode.DONE; } else if(res < 0){ - System.out.println("SKIPPING ROW"); return DeleteCode.SKIP; } @@ -113,7 +132,6 @@ public class DeleteCompare { } return DeleteCode.DONE; } else { - System.out.println("SKIPPING TS"); return DeleteCode.SKIP; } } diff --git a/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift b/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift index da7fc9313dd..bc1a677bfdd 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift +++ b/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift @@ -74,12 +74,11 @@ struct ColumnDescriptor { 2:i32 maxVersions = 3, 3:string compression = "NONE", 4:bool inMemory = 0, - 5:i32 maxValueLength = 2147483647, - 6:string bloomFilterType = "NONE", - 7:i32 bloomFilterVectorSize = 0, - 8:i32 bloomFilterNbHashes = 0, - 9:bool blockCacheEnabled = 0, - 10:i32 timeToLive = -1 + 5:string bloomFilterType = "NONE", + 6:i32 bloomFilterVectorSize = 0, + 7:i32 bloomFilterNbHashes = 0, + 8:bool blockCacheEnabled = 0, + 9:i32 timeToLive = -1 } /** @@ -463,6 +462,20 @@ service Hbase { 4:list columns) throws (1:IOError io) + /** + * Open a scanner for a given prefix. That is all rows will have the specified + * prefix. No other rows will be returned. + * + * @param tableName name of table + * @param startAndPrefix the prefix (and thus start row) of the keys you want + * @param columns the columns you want returned + * @return scanner id to use with other scanner calls + */ + ScannerID scannerOpenWithPrefix(1:Text tableName, + 2:Text startAndPrefix, + 3:list columns) + throws (1:IOError io) + /** * Get a scanner on the current table starting at the specified row and * ending at the last row in the table. Return the specified columns. diff --git a/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index 5cbccad0adc..e8ba93301cc 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -35,6 +35,9 @@ import org.apache.hadoop.hbase.HServerAddress; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.MasterNotRunningException; +import org.apache.hadoop.hbase.filter.Filter; +import org.apache.hadoop.hbase.filter.WhileMatchFilter; +import org.apache.hadoop.hbase.filter.PrefixFilter; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.client.HBaseAdmin; @@ -603,7 +606,24 @@ public class ThriftServer { throw new IOError(e.getMessage()); } } - + + @Override + public int scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws IOError, TException { + try { + HTable table = getTable(tableName); + byte [][] columnsArray = null; + columnsArray = columns.toArray(new byte[0][]); + Scan scan = new Scan(startAndPrefix); + scan.addColumns(columnsArray); + Filter f = new WhileMatchFilter( + new PrefixFilter(startAndPrefix)); + scan.setFilter(f); + return addScanner(table.getScanner(scan)); + } catch (IOException e) { + throw new IOError(e.getMessage()); + } + } + public int scannerOpenTs(byte[] tableName, byte[] startRow, List columns, long timestamp) throws IOError, TException { try { diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java b/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java index 1b2f644f3b1..278020f5a8a 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ + package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java b/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java index 289741c3158..62ff754b302 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java b/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java index 0c97bf4199a..53ba940bc84 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; @@ -129,7 +126,6 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable int maxVersions, String compression, boolean inMemory, - int maxValueLength, String bloomFilterType, int bloomFilterVectorSize, int bloomFilterNbHashes, diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java b/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java index fac806959f1..f2e3bf58c0c 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; @@ -41,6 +38,8 @@ public class Hbase { /** * Brings a table on-line (enables it) * @param tableName name of the table + * + * @param tableName */ public void enableTable(byte[] tableName) throws IOError, TException; @@ -48,12 +47,16 @@ public class Hbase { * Disables a table (takes it off-line) If it is being served, the master * will tell the servers to stop serving it. * @param tableName name of the table + * + * @param tableName */ public void disableTable(byte[] tableName) throws IOError, TException; /** * @param tableName name of table to check * @return true if table is on-line + * + * @param tableName */ public boolean isTableEnabled(byte[] tableName) throws IOError, TException; @@ -71,6 +74,8 @@ public class Hbase { * List all the column families assoicated with a table. * @param tableName table name * @return list of column family descriptors + * + * @param tableName */ public Map getColumnDescriptors(byte[] tableName) throws IOError, TException; @@ -78,6 +83,8 @@ public class Hbase { * List the regions associated with a table. * @param tableName table name * @return list of region descriptors + * + * @param tableName */ public List getTableRegions(byte[] tableName) throws IOError, TException; @@ -92,6 +99,9 @@ public class Hbase { * * @throws IllegalArgument if an input parameter is invalid * @throws AlreadyExists if the table name already exists + * + * @param tableName + * @param columnFamilies */ public void createTable(byte[] tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, TException; @@ -100,6 +110,8 @@ public class Hbase { * @param tableName name of table to delete * @throws IOError if table doesn't exist on server or there was some other * problem + * + * @param tableName */ public void deleteTable(byte[] tableName) throws IOError, TException; @@ -111,6 +123,10 @@ public class Hbase { * @param row row key * @param column column name * @return value for specified row/column + * + * @param tableName + * @param row + * @param column */ public List get(byte[] tableName, byte[] row, byte[] column) throws IOError, TException; @@ -123,6 +139,11 @@ public class Hbase { * @param column column name * @param numVersions number of versions to retrieve * @return list of cells for specified row/column + * + * @param tableName + * @param row + * @param column + * @param numVersions */ public List getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, TException; @@ -137,6 +158,12 @@ public class Hbase { * @param timestamp timestamp * @param numVersions number of versions to retrieve * @return list of cells for specified row/column + * + * @param tableName + * @param row + * @param column + * @param timestamp + * @param numVersions */ public List getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, TException; @@ -147,6 +174,9 @@ public class Hbase { * @param tableName name of table * @param row row key * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName + * @param row */ public List getRow(byte[] tableName, byte[] row) throws IOError, TException; @@ -158,6 +188,10 @@ public class Hbase { * @param row row key * @param columns List of columns to return, null for all columns * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName + * @param row + * @param columns */ public List getRowWithColumns(byte[] tableName, byte[] row, List columns) throws IOError, TException; @@ -169,6 +203,10 @@ public class Hbase { * @param row row key * @param timestamp timestamp * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName + * @param row + * @param timestamp */ public List getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException; @@ -180,6 +218,11 @@ public class Hbase { * @param row row key * @param columns List of columns to return, null for all columns * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName + * @param row + * @param columns + * @param timestamp */ public List getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws IOError, TException; @@ -192,6 +235,10 @@ public class Hbase { * @param tableName name of table * @param row row key * @param mutations list of mutation commands + * + * @param tableName + * @param row + * @param mutations */ public void mutateRow(byte[] tableName, byte[] row, List mutations) throws IOError, IllegalArgument, TException; @@ -205,6 +252,11 @@ public class Hbase { * @param row row key * @param mutations list of mutation commands * @param timestamp timestamp + * + * @param tableName + * @param row + * @param mutations + * @param timestamp */ public void mutateRowTs(byte[] tableName, byte[] row, List mutations, long timestamp) throws IOError, IllegalArgument, TException; @@ -216,6 +268,9 @@ public class Hbase { * * @param tableName name of table * @param rowBatches list of row batches + * + * @param tableName + * @param rowBatches */ public void mutateRows(byte[] tableName, List rowBatches) throws IOError, IllegalArgument, TException; @@ -228,6 +283,10 @@ public class Hbase { * @param tableName name of table * @param rowBatches list of row batches * @param timestamp timestamp + * + * @param tableName + * @param rowBatches + * @param timestamp */ public void mutateRowsTs(byte[] tableName, List rowBatches, long timestamp) throws IOError, IllegalArgument, TException; @@ -237,6 +296,11 @@ public class Hbase { * @param row row to increment * @param column name of column * @param value amount to increment by + * + * @param tableName + * @param row + * @param column + * @param value */ public long atomicIncrement(byte[] tableName, byte[] row, byte[] column, long value) throws IOError, IllegalArgument, TException; @@ -246,6 +310,10 @@ public class Hbase { * @param tableName name of table * @param row Row to update * @param column name of column whose value is to be deleted + * + * @param tableName + * @param row + * @param column */ public void deleteAll(byte[] tableName, byte[] row, byte[] column) throws IOError, TException; @@ -257,6 +325,11 @@ public class Hbase { * @param row Row to update * @param column name of column whose value is to be deleted * @param timestamp timestamp + * + * @param tableName + * @param row + * @param column + * @param timestamp */ public void deleteAllTs(byte[] tableName, byte[] row, byte[] column, long timestamp) throws IOError, TException; @@ -265,6 +338,9 @@ public class Hbase { * * @param tableName name of table * @param row key of the row to be completely deleted. + * + * @param tableName + * @param row */ public void deleteAllRow(byte[] tableName, byte[] row) throws IOError, TException; @@ -275,6 +351,10 @@ public class Hbase { * @param tableName name of table * @param row key of the row to be completely deleted. * @param timestamp timestamp + * + * @param tableName + * @param row + * @param timestamp */ public void deleteAllRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException; @@ -290,6 +370,10 @@ public class Hbase { * start at the first row. * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param columns */ public int scannerOpen(byte[] tableName, byte[] startRow, List columns) throws IOError, TException; @@ -308,9 +392,29 @@ public class Hbase { * scanner's results * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param stopRow + * @param columns */ public int scannerOpenWithStop(byte[] tableName, byte[] startRow, byte[] stopRow, List columns) throws IOError, TException; + /** + * Open a scanner for a given prefix. That is all rows will have the specified + * prefix. No other rows will be returned. + * + * @param tableName name of table + * @param startAndPrefix the prefix (and thus start row) of the keys you want + * @param columns the columns you want returned + * @return scanner id to use with other scanner calls + * + * @param tableName + * @param startAndPrefix + * @param columns + */ + public int scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws IOError, TException; + /** * Get a scanner on the current table starting at the specified row and * ending at the last row in the table. Return the specified columns. @@ -325,6 +429,11 @@ public class Hbase { * @param timestamp timestamp * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param columns + * @param timestamp */ public int scannerOpenTs(byte[] tableName, byte[] startRow, List columns, long timestamp) throws IOError, TException; @@ -345,6 +454,12 @@ public class Hbase { * @param timestamp timestamp * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param stopRow + * @param columns + * @param timestamp */ public int scannerOpenWithStopTs(byte[] tableName, byte[] startRow, byte[] stopRow, List columns, long timestamp) throws IOError, TException; @@ -358,6 +473,8 @@ public class Hbase { * @return a TRowResult containing the current row and a map of the columns to TCells. * @throws IllegalArgument if ScannerID is invalid * @throws NotFound when the scanner reaches the end + * + * @param id */ public List scannerGet(int id) throws IOError, IllegalArgument, TException; @@ -372,6 +489,9 @@ public class Hbase { * @return a TRowResult containing the current row and a map of the columns to TCells. * @throws IllegalArgument if ScannerID is invalid * @throws NotFound when the scanner reaches the end + * + * @param id + * @param nbRows */ public List scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, TException; @@ -380,6 +500,8 @@ public class Hbase { * * @param id id of a scanner returned by scannerOpen * @throws IllegalArgument if ScannerID is invalid + * + * @param id */ public void scannerClose(int id) throws IOError, IllegalArgument, TException; @@ -1440,6 +1562,44 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); } + public int scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws IOError, TException + { + send_scannerOpenWithPrefix(tableName, startAndPrefix, columns); + return recv_scannerOpenWithPrefix(); + } + + public void send_scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws TException + { + oprot_.writeMessageBegin(new TMessage("scannerOpenWithPrefix", TMessageType.CALL, seqid_)); + scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args(); + args.tableName = tableName; + args.startAndPrefix = startAndPrefix; + args.columns = columns; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public int recv_scannerOpenWithPrefix() throws IOError, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithPrefix failed: unknown result"); + } + public int scannerOpenTs(byte[] tableName, byte[] startRow, List columns, long timestamp) throws IOError, TException { send_scannerOpenTs(tableName, startRow, columns, timestamp); @@ -1667,6 +1827,7 @@ public class Hbase { processMap_.put("deleteAllRowTs", new deleteAllRowTs()); processMap_.put("scannerOpen", new scannerOpen()); processMap_.put("scannerOpenWithStop", new scannerOpenWithStop()); + processMap_.put("scannerOpenWithPrefix", new scannerOpenWithPrefix()); processMap_.put("scannerOpenTs", new scannerOpenTs()); processMap_.put("scannerOpenWithStopTs", new scannerOpenWithStopTs()); processMap_.put("scannerGet", new scannerGet()); @@ -2277,6 +2438,27 @@ public class Hbase { } + private class scannerOpenWithPrefix implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args(); + args.read(iprot); + iprot.readMessageEnd(); + scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result(); + try { + result.success = iface_.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns); + result.__isset.success = true; + } catch (IOError io) { + result.io = io; + } + oprot.writeMessageBegin(new TMessage("scannerOpenWithPrefix", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + private class scannerOpenTs implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { @@ -18802,6 +18984,661 @@ public class Hbase { } + public static class scannerOpenWithPrefix_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithPrefix_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField START_AND_PREFIX_FIELD_DESC = new TField("startAndPrefix", TType.STRING, (short)2); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)3); + + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] startAndPrefix; + public static final int STARTANDPREFIX = 2; + public List columns; + public static final int COLUMNS = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(STARTANDPREFIX, new FieldMetaData("startAndPrefix", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_args.class, metaDataMap); + } + + public scannerOpenWithPrefix_args() { + } + + public scannerOpenWithPrefix_args( + byte[] tableName, + byte[] startAndPrefix, + List columns) + { + this(); + this.tableName = tableName; + this.startAndPrefix = startAndPrefix; + this.columns = columns; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithPrefix_args(scannerOpenWithPrefix_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartAndPrefix()) { + this.startAndPrefix = other.startAndPrefix; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (byte[] other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + } + + @Override + public scannerOpenWithPrefix_args clone() { + return new scannerOpenWithPrefix_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getStartAndPrefix() { + return this.startAndPrefix; + } + + public void setStartAndPrefix(byte[] startAndPrefix) { + this.startAndPrefix = startAndPrefix; + } + + public void unsetStartAndPrefix() { + this.startAndPrefix = null; + } + + // Returns true if field startAndPrefix is set (has been asigned a value) and false otherwise + public boolean isSetStartAndPrefix() { + return this.startAndPrefix != null; + } + + public void setStartAndPrefixIsSet(boolean value) { + if (!value) { + this.startAndPrefix = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(byte[] elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case STARTANDPREFIX: + if (value == null) { + unsetStartAndPrefix(); + } else { + setStartAndPrefix((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case STARTANDPREFIX: + return getStartAndPrefix(); + + case COLUMNS: + return getColumns(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case STARTANDPREFIX: + return isSetStartAndPrefix(); + case COLUMNS: + return isSetColumns(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithPrefix_args) + return this.equals((scannerOpenWithPrefix_args)that); + return false; + } + + public boolean equals(scannerOpenWithPrefix_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!java.util.Arrays.equals(this.tableName, that.tableName)) + return false; + } + + boolean this_present_startAndPrefix = true && this.isSetStartAndPrefix(); + boolean that_present_startAndPrefix = true && that.isSetStartAndPrefix(); + if (this_present_startAndPrefix || that_present_startAndPrefix) { + if (!(this_present_startAndPrefix && that_present_startAndPrefix)) + return false; + if (!java.util.Arrays.equals(this.startAndPrefix, that.startAndPrefix)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) + { + case TABLENAME: + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case STARTANDPREFIX: + if (field.type == TType.STRING) { + this.startAndPrefix = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMNS: + if (field.type == TType.LIST) { + { + TList _list86 = iprot.readListBegin(); + this.columns = new ArrayList(_list86.size); + for (int _i87 = 0; _i87 < _list86.size; ++_i87) + { + byte[] _elem88; + _elem88 = iprot.readBinary(); + this.columns.add(_elem88); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(this.tableName); + oprot.writeFieldEnd(); + } + if (this.startAndPrefix != null) { + oprot.writeFieldBegin(START_AND_PREFIX_FIELD_DESC); + oprot.writeBinary(this.startAndPrefix); + oprot.writeFieldEnd(); + } + if (this.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); + for (byte[] _iter89 : this.columns) { + oprot.writeBinary(_iter89); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithPrefix_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startAndPrefix:"); + if (this.startAndPrefix == null) { + sb.append("null"); + } else { + sb.append(this.startAndPrefix); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class scannerOpenWithPrefix_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithPrefix_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + + public int success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean success = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_result.class, metaDataMap); + } + + public scannerOpenWithPrefix_result() { + } + + public scannerOpenWithPrefix_result( + int success, + IOError io) + { + this(); + this.success = success; + this.__isset.success = true; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithPrefix_result(scannerOpenWithPrefix_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public scannerOpenWithPrefix_result clone() { + return new scannerOpenWithPrefix_result(this); + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public void setSuccessIsSet(boolean value) { + this.__isset.success = value; + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Integer(getSuccess()); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithPrefix_result) + return this.equals((scannerOpenWithPrefix_result)that); + return false; + } + + public boolean equals(scannerOpenWithPrefix_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) + { + case SUCCESS: + if (field.type == TType.I32) { + this.success = iprot.readI32(); + this.__isset.success = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case IO: + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithPrefix_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + public static class scannerOpenTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -19147,13 +19984,13 @@ public class Hbase { case COLUMNS: if (field.type == TType.LIST) { { - TList _list86 = iprot.readListBegin(); - this.columns = new ArrayList(_list86.size); - for (int _i87 = 0; _i87 < _list86.size; ++_i87) + TList _list90 = iprot.readListBegin(); + this.columns = new ArrayList(_list90.size); + for (int _i91 = 0; _i91 < _list90.size; ++_i91) { - byte[] _elem88; - _elem88 = iprot.readBinary(); - this.columns.add(_elem88); + byte[] _elem92; + _elem92 = iprot.readBinary(); + this.columns.add(_elem92); } iprot.readListEnd(); } @@ -19200,8 +20037,8 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter89 : this.columns) { - oprot.writeBinary(_iter89); + for (byte[] _iter93 : this.columns) { + oprot.writeBinary(_iter93); } oprot.writeListEnd(); } @@ -19934,13 +20771,13 @@ public class Hbase { case COLUMNS: if (field.type == TType.LIST) { { - TList _list90 = iprot.readListBegin(); - this.columns = new ArrayList(_list90.size); - for (int _i91 = 0; _i91 < _list90.size; ++_i91) + TList _list94 = iprot.readListBegin(); + this.columns = new ArrayList(_list94.size); + for (int _i95 = 0; _i95 < _list94.size; ++_i95) { - byte[] _elem92; - _elem92 = iprot.readBinary(); - this.columns.add(_elem92); + byte[] _elem96; + _elem96 = iprot.readBinary(); + this.columns.add(_elem96); } iprot.readListEnd(); } @@ -19992,8 +20829,8 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter93 : this.columns) { - oprot.writeBinary(_iter93); + for (byte[] _iter97 : this.columns) { + oprot.writeBinary(_iter97); } oprot.writeListEnd(); } @@ -20797,14 +21634,14 @@ public class Hbase { case SUCCESS: if (field.type == TType.LIST) { { - TList _list94 = iprot.readListBegin(); - this.success = new ArrayList(_list94.size); - for (int _i95 = 0; _i95 < _list94.size; ++_i95) + TList _list98 = iprot.readListBegin(); + this.success = new ArrayList(_list98.size); + for (int _i99 = 0; _i99 < _list98.size; ++_i99) { - TRowResult _elem96; - _elem96 = new TRowResult(); - _elem96.read(iprot); - this.success.add(_elem96); + TRowResult _elem100; + _elem100 = new TRowResult(); + _elem100.read(iprot); + this.success.add(_elem100); } iprot.readListEnd(); } @@ -20848,8 +21685,8 @@ public class Hbase { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (TRowResult _iter97 : this.success) { - _iter97.write(oprot); + for (TRowResult _iter101 : this.success) { + _iter101.write(oprot); } oprot.writeListEnd(); } @@ -21446,14 +22283,14 @@ public class Hbase { case SUCCESS: if (field.type == TType.LIST) { { - TList _list98 = iprot.readListBegin(); - this.success = new ArrayList(_list98.size); - for (int _i99 = 0; _i99 < _list98.size; ++_i99) + TList _list102 = iprot.readListBegin(); + this.success = new ArrayList(_list102.size); + for (int _i103 = 0; _i103 < _list102.size; ++_i103) { - TRowResult _elem100; - _elem100 = new TRowResult(); - _elem100.read(iprot); - this.success.add(_elem100); + TRowResult _elem104; + _elem104 = new TRowResult(); + _elem104.read(iprot); + this.success.add(_elem104); } iprot.readListEnd(); } @@ -21497,8 +22334,8 @@ public class Hbase { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (TRowResult _iter101 : this.success) { - _iter101.write(oprot); + for (TRowResult _iter105 : this.success) { + _iter105.write(oprot); } oprot.writeListEnd(); } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java b/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java index 4280d0d0bd4..5220b0ac942 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java b/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java index b51ef619b35..d7870df4593 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java b/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java index 921beaa0ed0..a9613256481 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java b/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java index cc94058a193..5c1d57a3716 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java b/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java index 4f369366731..e09d9dcc7d9 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java b/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java index c00eb583d14..dc0572cd1c7 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java @@ -1,4 +1,6 @@ -/** +/* + * Copyright 2009 The Apache Software Foundation + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,11 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ package org.apache.hadoop.hbase.thrift.generated; import java.util.List; diff --git a/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java b/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java index 430dfdda66e..d5062e05f11 100644 --- a/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java +++ b/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java @@ -322,7 +322,7 @@ public class TestThriftServer extends HBaseClusterTestCase { // A slightly customized ColumnDescriptor (only 2 versions) ColumnDescriptor cDescB = new ColumnDescriptor(columnBname, 2, "NONE", - false, 2147483647, "NONE", 0, 0, false, -1); + false, "NONE", 0, 0, false, -1); cDescriptors.add(cDescB); return cDescriptors;