/// <summary>
 ///     Request mesasge for disable HBase table command.
 /// </summary>
 public DisableTableRequestMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Call);
     Identity = new MessageIdentity
     {
         Command = "disableTable",
         Version = (int)version
     };
     Identity.CommandLength = (uint)Identity.Command.Length;
 }
 /// <summary>
 ///     插入行集合应答
 /// </summary>
 public InsertNewRowsResponseMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Reply);
     Identity = new MessageIdentity
     {
         Command = "mutateRows",
         Version = (int)version
     };
     Identity.CommandLength = (uint) Identity.Command.Length;
 }
 /// <summary>
 ///     Request mesasge for creating HBase table command.
 /// </summary>
 public GetRowWithColumnsResponseMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Reply);
     Identity = new MessageIdentity
     {
         Command = "getRowWithColumns",
         Version = (int)version
     };
     Identity.CommandLength = (uint) Identity.Command.Length;
 }
 /// <summary>
 ///     Atomically increment the column value specified.  Returns the next value post increment.
 /// </summary>
 public AtomicIncrementResponseMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Reply);
     Identity = new MessageIdentity
     {
         Command = "atomicIncrement",
         Version = (int)version
     };
     Identity.CommandLength = (uint) Identity.Command.Length;
 }
 /// <summary>
 ///     Request mesasge for scaning a row list.
 /// </summary>
 public ScannerGetListResponseMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Call);
     Identity = new MessageIdentity
     {
         Command = "scannerGetList",
         Version = (int)version
     };
     Identity.CommandLength = (uint)Identity.Command.Length;
 }
 /// <summary>
 ///     获取目前HBase内部所有的表名请求消息
 /// </summary>
 public GetTableNamesRequestMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Call);
     Identity = new MessageIdentity
     {
         Command = "getTableNames",
         Version = (int)version
     };
     Identity.CommandLength = (uint) Identity.Command.Length;
 }
 /// <summary>
 ///     删除HBase表的应答消息
 /// </summary>
 public DeleteTableResponseMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Reply);
     Identity = new MessageIdentity
     {
         Command = "deleteTable",
         Version = (int)version
     };
     Identity.CommandLength = (uint) Identity.Command.Length;
 }
 /// <summary>
 ///     Request mesasge for inserting a new row into specified HBase table.
 /// </summary>
 public InsertNewRowRequestMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Call);
     Identity = new MessageIdentity
     {
         Command = "mutateRow",
         Version = (int)version
     };
     Identity.CommandLength = (uint)Identity.Command.Length;
 }
 /// <summary>
 ///     Request mesasge for close scanner command.
 /// </summary>
 public ScannerCloseRequestMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Call);
     Identity = new MessageIdentity
     {
         Command = "scannerClose",
         Version = (int)version
     };
     Identity.CommandLength = (uint)Identity.Command.Length;
 }
예제 #10
0
 /// <summary>
 ///     Request mesasge for inserting a new row into specified HBase table.
 /// </summary>
 public GetRowResponseMessage()
 {
     uint version = VERSION_1 | (uint)(MessageTypes.Call);
     Identity = new MessageIdentity
     {
         Command = "getRow",
         Version = (int)version
     };
     Identity.CommandLength = (uint)Identity.Command.Length;
 }
예제 #11
0
 /// <summary>
 ///    ���Զ�ȡһ��������Thrift��Ϣͷ���͵�����
 /// </summary>
 /// <returns>����һ��ֵ����ֵ��ʾ�˵�ǰ�Ƿ��ȡ�ɹ����������False, ��֤���ڲ���û���㹻�Ŀ��������Թ���ȡ</returns>
 public bool TryReadMessageIdentity(out MessageIdentity identity)
 {
     identity = new MessageIdentity();
     int version, commandLength, seqId;
     string command;
     if (!TryReadInt32(out version)) return false;
     if (!TryReadInt32(out commandLength)) return false;
     if (!TryReadString(Encoding.UTF8, (commandLength = commandLength.ToLittleEndian()), out command)) return false;
     if (!TryReadInt32(out seqId)) return false;
     identity.Version = version.ToLittleEndian();
     identity.CommandLength = (uint) commandLength;
     identity.Command = command;
     identity.SequenceId = (uint) seqId.ToLittleEndian();
     return true;
 }