hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From larsgeo...@apache.org
Subject svn commit: r1501722 [3/5] - in /hbase/trunk/hbase-examples: src/main/java/org/apache/hadoop/hbase/thrift/generated/ src/main/java/org/apache/hadoop/hbase/thrift2/ src/main/python/ src/main/python/gen-py/ src/main/python/thrift1/ src/main/python/thrift...
Date Wed, 10 Jul 2013 11:17:07 GMT
Added: hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/__init__.py
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/__init__.py?rev=1501722&view=auto
==============================================================================
--- hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/__init__.py (added)
+++ hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/__init__.py Wed Jul 10
11:17:06 2013
@@ -0,0 +1 @@
+__all__ = ['ttypes', 'constants', 'Hbase']

Added: hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py?rev=1501722&view=auto
==============================================================================
--- hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py (added)
+++ hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py Wed Jul 10
11:17:06 2013
@@ -0,0 +1,11 @@
+#
+# Autogenerated by Thrift Compiler (0.9.0)
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+#  options string: py
+#
+
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from ttypes import *
+

Added: hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py?rev=1501722&view=auto
==============================================================================
--- hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py (added)
+++ hbase/trunk/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py Wed Jul 10 11:17:06
2013
@@ -0,0 +1,1083 @@
+#
+# Autogenerated by Thrift Compiler (0.9.0)
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+#  options string: py
+#
+
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+
+from thrift.transport import TTransport
+from thrift.protocol import TBinaryProtocol, TProtocol
+try:
+  from thrift.protocol import fastbinary
+except:
+  fastbinary = None
+
+
+
+class TCell:
+  """
+  TCell - Used to transport a cell value (byte[]) and the timestamp it was
+  stored with together as a result for get and getRow methods. This promotes
+  the timestamp of a cell to a first-class value, making it easy to take
+  note of temporal data. Cell is used all the way from HStore up to HTable.
+
+  Attributes:
+   - value
+   - timestamp
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'value', None, None, ), # 1
+    (2, TType.I64, 'timestamp', None, None, ), # 2
+  )
+
+  def __init__(self, value=None, timestamp=None,):
+    self.value = value
+    self.timestamp = timestamp
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.value = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.I64:
+          self.timestamp = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TCell')
+    if self.value is not None:
+      oprot.writeFieldBegin('value', TType.STRING, 1)
+      oprot.writeString(self.value)
+      oprot.writeFieldEnd()
+    if self.timestamp is not None:
+      oprot.writeFieldBegin('timestamp', TType.I64, 2)
+      oprot.writeI64(self.timestamp)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class ColumnDescriptor:
+  """
+  An HColumnDescriptor contains information about a column family
+  such as the number of versions, compression settings, etc. It is
+  used as input when creating a table or adding a column.
+
+  Attributes:
+   - name
+   - maxVersions
+   - compression
+   - inMemory
+   - bloomFilterType
+   - bloomFilterVectorSize
+   - bloomFilterNbHashes
+   - blockCacheEnabled
+   - timeToLive
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'name', None, None, ), # 1
+    (2, TType.I32, 'maxVersions', None, 3, ), # 2
+    (3, TType.STRING, 'compression', None, "NONE", ), # 3
+    (4, TType.BOOL, 'inMemory', None, False, ), # 4
+    (5, TType.STRING, 'bloomFilterType', None, "NONE", ), # 5
+    (6, TType.I32, 'bloomFilterVectorSize', None, 0, ), # 6
+    (7, TType.I32, 'bloomFilterNbHashes', None, 0, ), # 7
+    (8, TType.BOOL, 'blockCacheEnabled', None, False, ), # 8
+    (9, TType.I32, 'timeToLive', None, -1, ), # 9
+  )
+
+  def __init__(self, name=None, maxVersions=thrift_spec[2][4], compression=thrift_spec[3][4],
inMemory=thrift_spec[4][4], bloomFilterType=thrift_spec[5][4], bloomFilterVectorSize=thrift_spec[6][4],
bloomFilterNbHashes=thrift_spec[7][4], blockCacheEnabled=thrift_spec[8][4], timeToLive=thrift_spec[9][4],):
+    self.name = name
+    self.maxVersions = maxVersions
+    self.compression = compression
+    self.inMemory = inMemory
+    self.bloomFilterType = bloomFilterType
+    self.bloomFilterVectorSize = bloomFilterVectorSize
+    self.bloomFilterNbHashes = bloomFilterNbHashes
+    self.blockCacheEnabled = blockCacheEnabled
+    self.timeToLive = timeToLive
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.name = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.I32:
+          self.maxVersions = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.STRING:
+          self.compression = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.BOOL:
+          self.inMemory = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
+        if ftype == TType.STRING:
+          self.bloomFilterType = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 6:
+        if ftype == TType.I32:
+          self.bloomFilterVectorSize = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 7:
+        if ftype == TType.I32:
+          self.bloomFilterNbHashes = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 8:
+        if ftype == TType.BOOL:
+          self.blockCacheEnabled = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 9:
+        if ftype == TType.I32:
+          self.timeToLive = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('ColumnDescriptor')
+    if self.name is not None:
+      oprot.writeFieldBegin('name', TType.STRING, 1)
+      oprot.writeString(self.name)
+      oprot.writeFieldEnd()
+    if self.maxVersions is not None:
+      oprot.writeFieldBegin('maxVersions', TType.I32, 2)
+      oprot.writeI32(self.maxVersions)
+      oprot.writeFieldEnd()
+    if self.compression is not None:
+      oprot.writeFieldBegin('compression', TType.STRING, 3)
+      oprot.writeString(self.compression)
+      oprot.writeFieldEnd()
+    if self.inMemory is not None:
+      oprot.writeFieldBegin('inMemory', TType.BOOL, 4)
+      oprot.writeBool(self.inMemory)
+      oprot.writeFieldEnd()
+    if self.bloomFilterType is not None:
+      oprot.writeFieldBegin('bloomFilterType', TType.STRING, 5)
+      oprot.writeString(self.bloomFilterType)
+      oprot.writeFieldEnd()
+    if self.bloomFilterVectorSize is not None:
+      oprot.writeFieldBegin('bloomFilterVectorSize', TType.I32, 6)
+      oprot.writeI32(self.bloomFilterVectorSize)
+      oprot.writeFieldEnd()
+    if self.bloomFilterNbHashes is not None:
+      oprot.writeFieldBegin('bloomFilterNbHashes', TType.I32, 7)
+      oprot.writeI32(self.bloomFilterNbHashes)
+      oprot.writeFieldEnd()
+    if self.blockCacheEnabled is not None:
+      oprot.writeFieldBegin('blockCacheEnabled', TType.BOOL, 8)
+      oprot.writeBool(self.blockCacheEnabled)
+      oprot.writeFieldEnd()
+    if self.timeToLive is not None:
+      oprot.writeFieldBegin('timeToLive', TType.I32, 9)
+      oprot.writeI32(self.timeToLive)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class TRegionInfo:
+  """
+  A TRegionInfo contains information about an HTable region.
+
+  Attributes:
+   - startKey
+   - endKey
+   - id
+   - name
+   - version
+   - serverName
+   - port
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'startKey', None, None, ), # 1
+    (2, TType.STRING, 'endKey', None, None, ), # 2
+    (3, TType.I64, 'id', None, None, ), # 3
+    (4, TType.STRING, 'name', None, None, ), # 4
+    (5, TType.BYTE, 'version', None, None, ), # 5
+    (6, TType.STRING, 'serverName', None, None, ), # 6
+    (7, TType.I32, 'port', None, None, ), # 7
+  )
+
+  def __init__(self, startKey=None, endKey=None, id=None, name=None, version=None, serverName=None,
port=None,):
+    self.startKey = startKey
+    self.endKey = endKey
+    self.id = id
+    self.name = name
+    self.version = version
+    self.serverName = serverName
+    self.port = port
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.startKey = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.endKey = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.I64:
+          self.id = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.STRING:
+          self.name = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
+        if ftype == TType.BYTE:
+          self.version = iprot.readByte();
+        else:
+          iprot.skip(ftype)
+      elif fid == 6:
+        if ftype == TType.STRING:
+          self.serverName = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 7:
+        if ftype == TType.I32:
+          self.port = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TRegionInfo')
+    if self.startKey is not None:
+      oprot.writeFieldBegin('startKey', TType.STRING, 1)
+      oprot.writeString(self.startKey)
+      oprot.writeFieldEnd()
+    if self.endKey is not None:
+      oprot.writeFieldBegin('endKey', TType.STRING, 2)
+      oprot.writeString(self.endKey)
+      oprot.writeFieldEnd()
+    if self.id is not None:
+      oprot.writeFieldBegin('id', TType.I64, 3)
+      oprot.writeI64(self.id)
+      oprot.writeFieldEnd()
+    if self.name is not None:
+      oprot.writeFieldBegin('name', TType.STRING, 4)
+      oprot.writeString(self.name)
+      oprot.writeFieldEnd()
+    if self.version is not None:
+      oprot.writeFieldBegin('version', TType.BYTE, 5)
+      oprot.writeByte(self.version)
+      oprot.writeFieldEnd()
+    if self.serverName is not None:
+      oprot.writeFieldBegin('serverName', TType.STRING, 6)
+      oprot.writeString(self.serverName)
+      oprot.writeFieldEnd()
+    if self.port is not None:
+      oprot.writeFieldBegin('port', TType.I32, 7)
+      oprot.writeI32(self.port)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class Mutation:
+  """
+  A Mutation object is used to either update or delete a column-value.
+
+  Attributes:
+   - isDelete
+   - column
+   - value
+   - writeToWAL
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.BOOL, 'isDelete', None, False, ), # 1
+    (2, TType.STRING, 'column', None, None, ), # 2
+    (3, TType.STRING, 'value', None, None, ), # 3
+    (4, TType.BOOL, 'writeToWAL', None, True, ), # 4
+  )
+
+  def __init__(self, isDelete=thrift_spec[1][4], column=None, value=None, writeToWAL=thrift_spec[4][4],):
+    self.isDelete = isDelete
+    self.column = column
+    self.value = value
+    self.writeToWAL = writeToWAL
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.BOOL:
+          self.isDelete = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.column = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.STRING:
+          self.value = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.BOOL:
+          self.writeToWAL = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('Mutation')
+    if self.isDelete is not None:
+      oprot.writeFieldBegin('isDelete', TType.BOOL, 1)
+      oprot.writeBool(self.isDelete)
+      oprot.writeFieldEnd()
+    if self.column is not None:
+      oprot.writeFieldBegin('column', TType.STRING, 2)
+      oprot.writeString(self.column)
+      oprot.writeFieldEnd()
+    if self.value is not None:
+      oprot.writeFieldBegin('value', TType.STRING, 3)
+      oprot.writeString(self.value)
+      oprot.writeFieldEnd()
+    if self.writeToWAL is not None:
+      oprot.writeFieldBegin('writeToWAL', TType.BOOL, 4)
+      oprot.writeBool(self.writeToWAL)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class BatchMutation:
+  """
+  A BatchMutation object is used to apply a number of Mutations to a single row.
+
+  Attributes:
+   - row
+   - mutations
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'row', None, None, ), # 1
+    (2, TType.LIST, 'mutations', (TType.STRUCT,(Mutation, Mutation.thrift_spec)), None, ),
# 2
+  )
+
+  def __init__(self, row=None, mutations=None,):
+    self.row = row
+    self.mutations = mutations
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.row = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.LIST:
+          self.mutations = []
+          (_etype3, _size0) = iprot.readListBegin()
+          for _i4 in xrange(_size0):
+            _elem5 = Mutation()
+            _elem5.read(iprot)
+            self.mutations.append(_elem5)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('BatchMutation')
+    if self.row is not None:
+      oprot.writeFieldBegin('row', TType.STRING, 1)
+      oprot.writeString(self.row)
+      oprot.writeFieldEnd()
+    if self.mutations is not None:
+      oprot.writeFieldBegin('mutations', TType.LIST, 2)
+      oprot.writeListBegin(TType.STRUCT, len(self.mutations))
+      for iter6 in self.mutations:
+        iter6.write(oprot)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class TIncrement:
+  """
+  For increments that are not incrementColumnValue
+  equivalents.
+
+  Attributes:
+   - table
+   - row
+   - column
+   - ammount
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'table', None, None, ), # 1
+    (2, TType.STRING, 'row', None, None, ), # 2
+    (3, TType.STRING, 'column', None, None, ), # 3
+    (4, TType.I64, 'ammount', None, None, ), # 4
+  )
+
+  def __init__(self, table=None, row=None, column=None, ammount=None,):
+    self.table = table
+    self.row = row
+    self.column = column
+    self.ammount = ammount
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.table = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.row = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.STRING:
+          self.column = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.I64:
+          self.ammount = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TIncrement')
+    if self.table is not None:
+      oprot.writeFieldBegin('table', TType.STRING, 1)
+      oprot.writeString(self.table)
+      oprot.writeFieldEnd()
+    if self.row is not None:
+      oprot.writeFieldBegin('row', TType.STRING, 2)
+      oprot.writeString(self.row)
+      oprot.writeFieldEnd()
+    if self.column is not None:
+      oprot.writeFieldBegin('column', TType.STRING, 3)
+      oprot.writeString(self.column)
+      oprot.writeFieldEnd()
+    if self.ammount is not None:
+      oprot.writeFieldBegin('ammount', TType.I64, 4)
+      oprot.writeI64(self.ammount)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class TRowResult:
+  """
+  Holds row name and then a map of columns to cells.
+
+  Attributes:
+   - row
+   - columns
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'row', None, None, ), # 1
+    (2, TType.MAP, 'columns', (TType.STRING,None,TType.STRUCT,(TCell, TCell.thrift_spec)),
None, ), # 2
+  )
+
+  def __init__(self, row=None, columns=None,):
+    self.row = row
+    self.columns = columns
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.row = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.MAP:
+          self.columns = {}
+          (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() 
+          for _i11 in xrange(_size7):
+            _key12 = iprot.readString();
+            _val13 = TCell()
+            _val13.read(iprot)
+            self.columns[_key12] = _val13
+          iprot.readMapEnd()
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TRowResult')
+    if self.row is not None:
+      oprot.writeFieldBegin('row', TType.STRING, 1)
+      oprot.writeString(self.row)
+      oprot.writeFieldEnd()
+    if self.columns is not None:
+      oprot.writeFieldBegin('columns', TType.MAP, 2)
+      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.columns))
+      for kiter14,viter15 in self.columns.items():
+        oprot.writeString(kiter14)
+        viter15.write(oprot)
+      oprot.writeMapEnd()
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class TScan:
+  """
+  A Scan object is used to specify scanner parameters when opening a scanner.
+
+  Attributes:
+   - startRow
+   - stopRow
+   - timestamp
+   - columns
+   - caching
+   - filterString
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'startRow', None, None, ), # 1
+    (2, TType.STRING, 'stopRow', None, None, ), # 2
+    (3, TType.I64, 'timestamp', None, None, ), # 3
+    (4, TType.LIST, 'columns', (TType.STRING,None), None, ), # 4
+    (5, TType.I32, 'caching', None, None, ), # 5
+    (6, TType.STRING, 'filterString', None, None, ), # 6
+  )
+
+  def __init__(self, startRow=None, stopRow=None, timestamp=None, columns=None, caching=None,
filterString=None,):
+    self.startRow = startRow
+    self.stopRow = stopRow
+    self.timestamp = timestamp
+    self.columns = columns
+    self.caching = caching
+    self.filterString = filterString
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.startRow = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.stopRow = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.I64:
+          self.timestamp = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.LIST:
+          self.columns = []
+          (_etype19, _size16) = iprot.readListBegin()
+          for _i20 in xrange(_size16):
+            _elem21 = iprot.readString();
+            self.columns.append(_elem21)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
+        if ftype == TType.I32:
+          self.caching = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 6:
+        if ftype == TType.STRING:
+          self.filterString = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TScan')
+    if self.startRow is not None:
+      oprot.writeFieldBegin('startRow', TType.STRING, 1)
+      oprot.writeString(self.startRow)
+      oprot.writeFieldEnd()
+    if self.stopRow is not None:
+      oprot.writeFieldBegin('stopRow', TType.STRING, 2)
+      oprot.writeString(self.stopRow)
+      oprot.writeFieldEnd()
+    if self.timestamp is not None:
+      oprot.writeFieldBegin('timestamp', TType.I64, 3)
+      oprot.writeI64(self.timestamp)
+      oprot.writeFieldEnd()
+    if self.columns is not None:
+      oprot.writeFieldBegin('columns', TType.LIST, 4)
+      oprot.writeListBegin(TType.STRING, len(self.columns))
+      for iter22 in self.columns:
+        oprot.writeString(iter22)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    if self.caching is not None:
+      oprot.writeFieldBegin('caching', TType.I32, 5)
+      oprot.writeI32(self.caching)
+      oprot.writeFieldEnd()
+    if self.filterString is not None:
+      oprot.writeFieldBegin('filterString', TType.STRING, 6)
+      oprot.writeString(self.filterString)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class IOError(TException):
+  """
+  An IOError exception signals that an error occurred communicating
+  to the Hbase master or an Hbase region server.  Also used to return
+  more general Hbase error conditions.
+
+  Attributes:
+   - message
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'message', None, None, ), # 1
+  )
+
+  def __init__(self, message=None,):
+    self.message = message
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.message = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('IOError')
+    if self.message is not None:
+      oprot.writeFieldBegin('message', TType.STRING, 1)
+      oprot.writeString(self.message)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __str__(self):
+    return repr(self)
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class IllegalArgument(TException):
+  """
+  An IllegalArgument exception indicates an illegal or invalid
+  argument was passed into a procedure.
+
+  Attributes:
+   - message
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'message', None, None, ), # 1
+  )
+
+  def __init__(self, message=None,):
+    self.message = message
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.message = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('IllegalArgument')
+    if self.message is not None:
+      oprot.writeFieldBegin('message', TType.STRING, 1)
+      oprot.writeString(self.message)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __str__(self):
+    return repr(self)
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class AlreadyExists(TException):
+  """
+  An AlreadyExists exceptions signals that a table with the specified
+  name already exists
+
+  Attributes:
+   - message
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'message', None, None, ), # 1
+  )
+
+  def __init__(self, message=None,):
+    self.message = message
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.message = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('AlreadyExists')
+    if self.message is not None:
+      oprot.writeFieldBegin('message', TType.STRING, 1)
+      oprot.writeString(self.message)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __str__(self):
+    return repr(self)
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)

Added: hbase/trunk/hbase-examples/src/main/python/thrift2/DemoClient.py
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-examples/src/main/python/thrift2/DemoClient.py?rev=1501722&view=auto
==============================================================================
--- hbase/trunk/hbase-examples/src/main/python/thrift2/DemoClient.py (added)
+++ hbase/trunk/hbase-examples/src/main/python/thrift2/DemoClient.py Wed Jul 10 11:17:06 2013
@@ -0,0 +1,76 @@
+"""
+
+  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.
+"""
+# Instructions:
+# 1. Run Thrift to generate the python module hbase
+#    thrift --gen py ../../../../../hbase-server/src/main/resources/org/apache/hadoop \
+#      /hbase/thrift2/hbase.thrift
+# 2. Create a directory of your choosing that contains:
+#     a. This file (DemoClient.py).
+#     b. The directory gen-py/hbase (generated by instruction step 1).
+# 3. pip install thrift==0.9.0
+# 4. Create a table call "example", with a family called "family1" using the hbase shell.
+# 5. Start the hbase thrift2 server
+#    bin/hbase thrift2 start
+# 6. Execute {python DemoClient.py}.
+
+import sys
+import os
+import time
+
+from thrift.transport import TTransport
+from thrift.transport import TSocket
+from thrift.transport import THttpClient
+from thrift.protocol import TBinaryProtocol
+
+# Add path for local "gen-py/hbase" for the pre-generated module
+gen_py_path = os.path.abspath('gen-py')
+sys.path.append(gen_py_path)
+from hbase import THBaseService
+from hbase.ttypes import *
+
+print "Thrift2 Demo"
+print "This demo assumes you have a table called \"example\" with a column family called
\"family1\""
+
+host = "localhost"
+port = 9090
+framed = False
+
+socket = TSocket.TSocket(host, port)
+if framed:
+  transport = TTransport.TFramedTransport(socket)
+else:
+  transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol.TBinaryProtocol(transport)
+client = THBaseService.Client(protocol)
+
+transport.open()
+
+table = "example"
+
+put = TPut(row="row1", columnValues=[TColumnValue(family="family1",qualifier="qualifier1",value="value1")])
+print "Putting:", put
+client.put(table, put)
+
+get = TGet(row="row1")
+print "Getting:", get
+result = client.get(table, get)
+
+print "Result:", result
+
+transport.close()

Added: hbase/trunk/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote?rev=1501722&view=auto
==============================================================================
--- hbase/trunk/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote (added)
+++ hbase/trunk/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote Wed
Jul 10 11:17:06 2013
@@ -0,0 +1,172 @@
+#!/usr/bin/env python
+#
+# Autogenerated by Thrift Compiler (0.9.0)
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+#  options string: py
+#
+
+import sys
+import pprint
+from urlparse import urlparse
+from thrift.transport import TTransport
+from thrift.transport import TSocket
+from thrift.transport import THttpClient
+from thrift.protocol import TBinaryProtocol
+
+import THBaseService
+from ttypes import *
+
+if len(sys.argv) <= 1 or sys.argv[1] == '--help':
+  print ''
+  print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1
[arg2...]]'
+  print ''
+  print 'Functions:'
+  print '  bool exists(string table, TGet get)'
+  print '  TResult get(string table, TGet get)'
+  print '   getMultiple(string table,  gets)'
+  print '  void put(string table, TPut put)'
+  print '  bool checkAndPut(string table, string row, string family, string qualifier, string
value, TPut put)'
+  print '  void putMultiple(string table,  puts)'
+  print '  void deleteSingle(string table, TDelete deleteSingle)'
+  print '   deleteMultiple(string table,  deletes)'
+  print '  bool checkAndDelete(string table, string row, string family, string qualifier,
string value, TDelete deleteSingle)'
+  print '  TResult increment(string table, TIncrement increment)'
+  print '  i32 openScanner(string table, TScan scan)'
+  print '   getScannerRows(i32 scannerId, i32 numRows)'
+  print '  void closeScanner(i32 scannerId)'
+  print ''
+  sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent = 2)
+host = 'localhost'
+port = 9090
+uri = ''
+framed = False
+http = False
+argi = 1
+
+if sys.argv[argi] == '-h':
+  parts = sys.argv[argi+1].split(':')
+  host = parts[0]
+  if len(parts) > 1:
+    port = int(parts[1])
+  argi += 2
+
+if sys.argv[argi] == '-u':
+  url = urlparse(sys.argv[argi+1])
+  parts = url[1].split(':')
+  host = parts[0]
+  if len(parts) > 1:
+    port = int(parts[1])
+  else:
+    port = 80
+  uri = url[2]
+  if url[4]:
+    uri += '?%s' % url[4]
+  http = True
+  argi += 2
+
+if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
+  framed = True
+  argi += 1
+
+cmd = sys.argv[argi]
+args = sys.argv[argi+1:]
+
+if http:
+  transport = THttpClient.THttpClient(host, port, uri)
+else:
+  socket = TSocket.TSocket(host, port)
+  if framed:
+    transport = TTransport.TFramedTransport(socket)
+  else:
+    transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol.TBinaryProtocol(transport)
+client = THBaseService.Client(protocol)
+transport.open()
+
+if cmd == 'exists':
+  if len(args) != 2:
+    print 'exists requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.exists(args[0],eval(args[1]),))
+
+elif cmd == 'get':
+  if len(args) != 2:
+    print 'get requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.get(args[0],eval(args[1]),))
+
+elif cmd == 'getMultiple':
+  if len(args) != 2:
+    print 'getMultiple requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.getMultiple(args[0],eval(args[1]),))
+
+elif cmd == 'put':
+  if len(args) != 2:
+    print 'put requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.put(args[0],eval(args[1]),))
+
+elif cmd == 'checkAndPut':
+  if len(args) != 6:
+    print 'checkAndPut requires 6 args'
+    sys.exit(1)
+  pp.pprint(client.checkAndPut(args[0],args[1],args[2],args[3],args[4],eval(args[5]),))
+
+elif cmd == 'putMultiple':
+  if len(args) != 2:
+    print 'putMultiple requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.putMultiple(args[0],eval(args[1]),))
+
+elif cmd == 'deleteSingle':
+  if len(args) != 2:
+    print 'deleteSingle requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.deleteSingle(args[0],eval(args[1]),))
+
+elif cmd == 'deleteMultiple':
+  if len(args) != 2:
+    print 'deleteMultiple requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.deleteMultiple(args[0],eval(args[1]),))
+
+elif cmd == 'checkAndDelete':
+  if len(args) != 6:
+    print 'checkAndDelete requires 6 args'
+    sys.exit(1)
+  pp.pprint(client.checkAndDelete(args[0],args[1],args[2],args[3],args[4],eval(args[5]),))
+
+elif cmd == 'increment':
+  if len(args) != 2:
+    print 'increment requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.increment(args[0],eval(args[1]),))
+
+elif cmd == 'openScanner':
+  if len(args) != 2:
+    print 'openScanner requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.openScanner(args[0],eval(args[1]),))
+
+elif cmd == 'getScannerRows':
+  if len(args) != 2:
+    print 'getScannerRows requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.getScannerRows(eval(args[0]),eval(args[1]),))
+
+elif cmd == 'closeScanner':
+  if len(args) != 1:
+    print 'closeScanner requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.closeScanner(eval(args[0]),))
+
+else:
+  print 'Unrecognized method %s' % cmd
+  sys.exit(1)
+
+transport.close()

Propchange: hbase/trunk/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message