Not sure of the question. A scan will return multiple rows in sequential order. Note that its sequential byte stream order.
The columns will also be in sequential order as well… So if you have a set of column named as ‘foo’+timestamp then for each column in the set of foo, it will be in order with the oldest data first. If you created a set of columns named as ‘bar’+(epoch - timestamp) then for each column in the set of bar, it will be in order with the youngest data first. Note that all the columns in the set of bar+… will come before the columns in foo+… HTH On Nov 10, 2014, at 7:36 PM, greenblue <gblue1...@gmail.com> wrote: > When I call the function 'getRow', it returns array. > But I couldn't find any documents about order of data sequence. > > For instance, > Presume that a column family is 'c' and qualifiers start from 'c:0000000' to > 'c:1000000'. > And when I call the function like below > > $rowarr = getRow($table, $rowkey); > > Does a result guarantee sequential order like below? > Thank you in advance. > > $rowarr[0] has always 'c:' and 'c:0000000' ~ 'c:0000100' > $rowarr[1] has always 'c:0000101' ~ 'c:0000200' > ... > $rowarr[n] has always 'c:0999990' ~ 'c:1000000' > > ------------------------------ > HBase.php code > ------------------------------ > > public function getRow($tableName, $row, $attributes) > { > $this->send_getRow($tableName, $row, $attributes); > return $this->recv_getRow(); > } > > public function send_getRow($tableName, $row, $attributes) > { > $args = new \Hbase\Hbase_getRow_args(); > $args->tableName = $tableName; > $args->row = $row; > $args->attributes = $attributes; > $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && > function_exists('thrift_protocol_write_binary'); > if ($bin_accel) > { > thrift_protocol_write_binary($this->output_, 'getRow', > TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); > } > else > { > $this->output_->writeMessageBegin('getRow', TMessageType::CALL, > $this->seqid_); > $args->write($this->output_); > $this->output_->writeMessageEnd(); > $this->output_->getTransport()->flush(); > } > } > > public function recv_getRow() > { > $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && > function_exists('thrift_protocol_read_binary'); > if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, > '\Hbase\Hbase_getRow_result', $this->input_->isStrictRead()); > else > { > $rseqid = 0; > $fname = null; > $mtype = 0; > > $this->input_->readMessageBegin($fname, $mtype, $rseqid); > if ($mtype == TMessageType::EXCEPTION) { > $x = new TApplicationException(); > $x->read($this->input_); > $this->input_->readMessageEnd(); > throw $x; > } > $result = new \Hbase\Hbase_getRow_result(); > $result->read($this->input_); > $this->input_->readMessageEnd(); > } > if ($result->success !== null) { > return $result->success; > } > if ($result->io !== null) { > throw $result->io; > } > throw new \Exception("getRow failed: unknown result"); > } > > > > -- > View this message in context: > http://apache-hbase.679495.n3.nabble.com/I-m-studying-hbase-with-php-and-I-wonder-getRow-guarantee-sequential-order-tp4065833.html > Sent from the HBase User mailing list archive at Nabble.com. >