| 588 | } |
| 589 | |
| 590 | inline Status HBaseTableScanner::GetRowKey(JNIEnv* env, jobject cell, |
| 591 | void** data, int* length) { |
| 592 | JniLocalFrame frame; |
| 593 | RETURN_IF_ERROR(frame.push(env)); |
| 594 | int offset = env->CallIntMethod(cell, cell_get_row_offset_id_); |
| 595 | RETURN_ERROR_IF_EXC(env); |
| 596 | *length = env->CallShortMethod(cell, cell_get_row_length_id_); |
| 597 | RETURN_ERROR_IF_EXC(env); |
| 598 | jbyteArray jdata = |
| 599 | (jbyteArray) env->CallObjectMethod(cell, cell_get_row_array_); |
| 600 | RETURN_ERROR_IF_EXC(env); |
| 601 | *data = value_pool_->TryAllocate(*length); |
| 602 | if (UNLIKELY(*data == NULL)) { |
| 603 | string details = Substitute(HBASE_MEM_LIMIT_EXCEEDED, "GetRowKey", |
| 604 | *length, "row array"); |
| 605 | return value_pool_->mem_tracker()->MemLimitExceeded(state_, details, *length); |
| 606 | } |
| 607 | env->GetByteArrayRegion(jdata, offset, *length, reinterpret_cast<jbyte*>(*data)); |
| 608 | RETURN_ERROR_IF_EXC(env); |
| 609 | COUNTER_ADD(scan_node_->bytes_read_counter(), *length); |
| 610 | return Status::OK(); |
| 611 | } |
| 612 | |
| 613 | inline Status HBaseTableScanner::GetFamily(JNIEnv* env, jobject cell, |
| 614 | void** data, int* length) { |
no test coverage detected