MCPcopy Create free account
hub / github.com/baidu/tera / NativeScan

Function NativeScan

src/sdk/java/native-src/jni_tera_table.cc:176–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176JNIEXPORT jlong NativeScan(JNIEnv* env, jobject jobj, jlong jtable, jlong jdesc) {
177 tera::Table* table = reinterpret_cast<tera::Table*>(jtable);
178 tera::ScanDescriptor* desc = reinterpret_cast<tera::ScanDescriptor*>(jdesc);
179 tera::ErrorCode error_code;
180
181 if (table == NULL || desc == NULL) {
182 SendErrorJ(env, jobj, "table or scan descriptor not initialized.");
183 return 0;
184 }
185
186 tera::ResultStream* result_stream;
187 if ((result_stream = table->Scan(*desc, &error_code)) == NULL) {
188 LOG(ERROR) << "fail to scan records from table: " << table->GetName();
189 return 0;
190 }
191
192 return reinterpret_cast<jlong>(result_stream);
193}

Callers

nothing calls this directly

Calls 3

SendErrorJFunction · 0.85
ScanMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected