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

Function NativeApplyMutation

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

Source from the content-addressed store, hash-verified

107}
108
109JNIEXPORT jboolean
110NativeApplyMutation(JNIEnv* env, jobject jobj, jlong jtable_ptr, jlong jmutation_ptr) {
111 tera::Table* table = reinterpret_cast<tera::Table*>(jtable_ptr);
112 tera::RowMutation* mutation = reinterpret_cast<tera::RowMutation*>(jmutation_ptr);
113 tera::ErrorCode error_code;
114
115 if (table == NULL || mutation == NULL) {
116 SendErrorJ(env, jobj, "table or mutation not initialized.");
117 return JNI_FALSE;
118 }
119 if (mutation->MutationNum() <= 0) {
120 return JNI_TRUE;
121 }
122
123 // mutation->SetCallBack(MutationCallBack);
124 table->ApplyMutation(mutation);
125 return JNI_TRUE;
126}
127
128JNIEXPORT void NativeFlushCommits(JNIEnv* env, jobject jobj, jlong jtable_ptr) {
129 tera::Table* table = reinterpret_cast<tera::Table*>(jtable_ptr);

Callers

nothing calls this directly

Calls 3

SendErrorJFunction · 0.85
MutationNumMethod · 0.45
ApplyMutationMethod · 0.45

Tested by

no test coverage detected