Пример #1
0
 public List<TRowResult> Search(string tableName, TScan scan)
 {
     List<TRowResult> result = new List<TRowResult>();
     TBufferedTransport tsport = null;
     Hbase.Client client = Connect(out tsport);
     if (client != null)
     {
         int scanId = client.scannerOpenWithScan(Unitl.StrToBytes(tableName), scan);
         result = client.scannerGet(scanId);
         client.scannerClose(scanId);
         tsport.Close();
     }
     return result;
 }
Пример #2
0
 public int scannerOpenWithScan(byte[] tableName, TScan scan)
 {
     send_scannerOpenWithScan(tableName, scan);
     return recv_scannerOpenWithScan();
 }
Пример #3
0
 public void send_scannerOpenWithScan(byte[] tableName, TScan scan)
 {
     oprot_.WriteMessageBegin(new TMessage("scannerOpenWithScan", TMessageType.Call, seqid_));
     scannerOpenWithScan_args args = new scannerOpenWithScan_args();
     args.TableName = tableName;
     args.Scan = scan;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Пример #4
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.String)
                 {
                     TableName = iprot.ReadBinary();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.Struct)
                 {
                     Scan = new TScan();
                     Scan.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }