HDFS-14846: libhdfs tests are failing on trunk due to jni usage bugs

Signed-off-by: Anu Engineer <aengineer@apache.org>
This commit is contained in:
Sahil Takiar 2019-09-12 15:51:05 -07:00 committed by Anu Engineer
parent f580a87079
commit 3cf6e4272f
3 changed files with 1 additions and 5 deletions

View File

@ -199,8 +199,5 @@ done:
if (ginfo) { if (ginfo) {
hadoop_group_info_free(ginfo); hadoop_group_info_free(ginfo);
} }
if (jgroupname) {
(*env)->DeleteLocalRef(env, jgroupname);
}
return jgroups; return jgroups;
} }

View File

@ -184,8 +184,8 @@ struct NativeMiniDfsCluster* nmdCreate(struct NativeMiniDfsConf *conf)
"Builder::numDataNodes"); "Builder::numDataNodes");
goto error; goto error;
} }
}
(*env)->DeleteLocalRef(env, val.l); (*env)->DeleteLocalRef(env, val.l);
}
jthr = findClassAndInvokeMethod(env, &val, INSTANCE, bld, MINIDFS_CLUSTER_BUILDER, jthr = findClassAndInvokeMethod(env, &val, INSTANCE, bld, MINIDFS_CLUSTER_BUILDER,
"build", "()L" MINIDFS_CLUSTER ";"); "build", "()L" MINIDFS_CLUSTER ";");
if (jthr) { if (jthr) {

View File

@ -3480,7 +3480,6 @@ done:
destroyLocalReference(env, jUserName); destroyLocalReference(env, jUserName);
destroyLocalReference(env, jGroupName); destroyLocalReference(env, jGroupName);
destroyLocalReference(env, jPermission); destroyLocalReference(env, jPermission);
destroyLocalReference(env, jPath);
return jthr; return jthr;
} }