XMLWordPrintableJSON

Details

    Description

      The classpath is created assuming the native-client is a module of the parent hbase repo. Since that is not the case anymore and we rely on a dynamically pulled HBase version, we need to fix the classpath for the JVM that is spun using JNI. Otherwise mini-cluster won't start..

      using hbase::MiniCluster;
      
      JNIEnv *MiniCluster::CreateVM(JavaVM **jvm) {
        JavaVMInitArgs args;
        JavaVMOption jvm_options;
        args.version = JNI_VERSION_1_6;
        args.nOptions = 1;
        char *classpath = getenv("CLASSPATH");
        std::string clspath;
        if (classpath == NULL || strstr(classpath, "-tests.jar") == NULL) {
          std::string clsPathFilePath("../../../hbase-build-configuration/target/cached_classpath.txt");
          std::ifstream fd(clsPathFilePath);
          std::string prefix("");
          if (fd.is_open()) {
            if (classpath == NULL) {
              LOG(INFO) << "got empty classpath";
            } else {
              // prefix bootstrapper.jar
              prefix.assign(classpath);
            }
            std::string line;
      

       

       

      Attachments

        Issue Links

          Activity

            People

              bharathv Bharath Vissapragada
              bharathv Bharath Vissapragada
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: