Repository: incubator-impala
Updated Branches:
  refs/heads/master d25db64f0 -> 7ccbfe47f


IMPALA-5709: Remove mini-impala-cluster

Remove untested / unused mini-impala-cluster binary.

Change-Id: I677314fc1a998dffa9120c016bfcf761b4e39f05
Reviewed-on: http://gerrit.cloudera.org:8080/7488
Reviewed-by: Matthew Jacobs <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/d2d7328d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/d2d7328d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/d2d7328d

Branch: refs/heads/master
Commit: d2d7328dd3aa1051bcb5329c5bea8bdc1850d281
Parents: d25db64
Author: Henry Robinson <[email protected]>
Authored: Fri Jul 21 15:24:59 2017 -0700
Committer: Impala Public Jenkins <[email protected]>
Committed: Tue Jul 25 02:01:12 2017 +0000

----------------------------------------------------------------------
 be/src/testutil/CMakeLists.txt         |  6 --
 be/src/testutil/mini-impala-cluster.cc | 89 -----------------------------
 bin/start-impala-cluster.py            | 39 +++++--------
 bin/start-impalad.sh                   |  9 +--
 4 files changed, 15 insertions(+), 128 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d2d7328d/be/src/testutil/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/be/src/testutil/CMakeLists.txt b/be/src/testutil/CMakeLists.txt
index a375986..f6d2bcd 100644
--- a/be/src/testutil/CMakeLists.txt
+++ b/be/src/testutil/CMakeLists.txt
@@ -42,9 +42,3 @@ add_dependencies(test-udfs-ir thrift-deps)
 
 add_library(TestUdas SHARED test-udas.cc)
 add_dependencies(TestUdas thrift-deps)
-
-add_executable(mini-impala-cluster
-  mini-impala-cluster.cc
-)
-
-target_link_libraries(mini-impala-cluster ${IMPALA_LINK_LIBS})

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d2d7328d/be/src/testutil/mini-impala-cluster.cc
----------------------------------------------------------------------
diff --git a/be/src/testutil/mini-impala-cluster.cc 
b/be/src/testutil/mini-impala-cluster.cc
deleted file mode 100644
index 509af39..0000000
--- a/be/src/testutil/mini-impala-cluster.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-//
-// A standalone test utility that starts multiple Impala backends and a state 
store
-// within a single process.
-
-
-#include "codegen/llvm-codegen.h"
-#include "common/logging.h"
-#include "common/init.h"
-#include "exec/hbase-table-scanner.h"
-#include "exec/hbase-table-writer.h"
-#include "rpc/authentication.h"
-#include "rpc/thrift-util.h"
-#include "rpc/thrift-server.h"
-#include "runtime/hbase-table.h"
-#include "service/fe-support.h"
-#include "service/impala-server.h"
-#include "util/jni-util.h"
-#include "testutil/in-process-servers.h"
-
-DEFINE_int32(num_backends, 3, "The number of backends to start");
-DECLARE_int32(be_port);
-DECLARE_int32(beeswax_port);
-DECLARE_int32(hs2_port);
-DECLARE_string(principal);
-
-#include "common/names.h"
-
-using namespace impala;
-
-int main(int argc, char** argv) {
-  InitCommonRuntime(argc, argv, true);
-  if (FLAGS_num_backends <= 0) {
-    LOG(ERROR) << "-num_backends arg must be > 0";
-    exit(1);
-  }
-
-  LlvmCodeGen::InitializeLlvm();
-  JniUtil::InitLibhdfs();
-  ABORT_IF_ERROR(HBaseTableScanner::Init());
-  ABORT_IF_ERROR(HBaseTable::InitJNI());
-  ABORT_IF_ERROR(HBaseTableWriter::InitJNI());
-  InitFeSupport();
-
-  int base_be_port = FLAGS_be_port;
-  int base_subscriber_port = 21500;
-  int base_webserver_port = 25000;
-
-  int beeswax_port = 21000;
-  int hs2_port = 21050;
-
-  scoped_ptr<InProcessStatestore> statestore(new InProcessStatestore(23000, 
25100));
-  ABORT_IF_ERROR(statestore->Start());
-  LOG(INFO) << "Started in-process statestore";
-
-  vector<InProcessImpalaServer*> impala_servers;
-  for (int i = 0; i < FLAGS_num_backends; ++i) {
-    impala_servers.push_back(
-        new InProcessImpalaServer(FLAGS_hostname, base_be_port + i,
-                                  base_subscriber_port + i, 
base_webserver_port + i,
-                                  FLAGS_hostname, 23000));
-    // First server in the list runs client servers
-    if (i == 0) {
-      ABORT_IF_ERROR(impala_servers[i]->StartWithClientServers(beeswax_port, 
hs2_port));
-    } else {
-      ABORT_IF_ERROR(impala_servers[i]->StartAsBackendOnly());
-    }
-  }
-
-  impala_servers[0]->Join();
-
-  for (InProcessImpalaServer* server: impala_servers) delete server;
-}

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d2d7328d/bin/start-impala-cluster.py
----------------------------------------------------------------------
diff --git a/bin/start-impala-cluster.py b/bin/start-impala-cluster.py
index 2b42959..c253ca8 100755
--- a/bin/start-impala-cluster.py
+++ b/bin/start-impala-cluster.py
@@ -139,7 +139,7 @@ def exec_impala_process(cmd, args, stderr_log_file_path):
   os.system(cmd)
 
 def kill_cluster_processes(force=False):
-  binaries = ['catalogd', 'impalad', 'statestored', 'mini-impala-cluster']
+  binaries = ['catalogd', 'impalad', 'statestored']
   kill_matching_processes(binaries, force)
 
 def kill_matching_processes(binary_names, force=False):
@@ -183,14 +183,6 @@ def start_catalogd():
     raise RuntimeError("Unable to start catalogd. Check log or file 
permissions"
                        " for more details.")
 
-def start_mini_impala_cluster(cluster_size):
-  print ("Starting in-process Impala Cluster logging "
-         "to %s/mini-impala-cluster.INFO" % options.log_dir)
-  args = "-num_backends=%s %s" %\
-         (cluster_size, build_impalad_logging_args(0, 'mini-impala-cluster'))
-  stderr_log_file_path = os.path.join(options.log_dir, 
'mini-impala-cluster-error.log')
-  exec_impala_process(MINI_IMPALA_CLUSTER_PATH, args, stderr_log_file_path)
-
 def build_impalad_port_args(instance_num):
   BASE_BEESWAX_PORT = 21000
   BASE_HS2_PORT = 21050
@@ -388,23 +380,18 @@ if __name__ == "__main__":
     # restart_only_impalad=True.
     wait_for_cluster = wait_for_cluster_cmdline
 
-  if options.inprocess:
-    # The statestore and the impalads start in the same process.
-    start_mini_impala_cluster(options.cluster_size)
-    wait_for_cluster_cmdline()
-  else:
-    try:
-      if not options.restart_impalad_only:
-        start_statestore()
-        start_catalogd()
-      start_impalad_instances(options.cluster_size, options.num_coordinators,
-          options.use_exclusive_coordinators)
-      # Sleep briefly to reduce log spam: the cluster takes some time to start 
up.
-      sleep(3)
-      wait_for_cluster()
-    except Exception, e:
-      print 'Error starting cluster: %s' % e
-      sys.exit(1)
+  try:
+    if not options.restart_impalad_only:
+      start_statestore()
+      start_catalogd()
+    start_impalad_instances(options.cluster_size, options.num_coordinators,
+                            options.use_exclusive_coordinators)
+    # Sleep briefly to reduce log spam: the cluster takes some time to start 
up.
+    sleep(3)
+    wait_for_cluster()
+  except Exception, e:
+    print 'Error starting cluster: %s' % e
+    sys.exit(1)
 
   print 'Impala Cluster Running with %d nodes and %d coordinators.' % (
       options.cluster_size, options.num_coordinators)

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d2d7328d/bin/start-impalad.sh
----------------------------------------------------------------------
diff --git a/bin/start-impalad.sh b/bin/start-impalad.sh
index 6792cef..d4602b5 100755
--- a/bin/start-impalad.sh
+++ b/bin/start-impalad.sh
@@ -17,9 +17,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-# Starts up an impalad or a mini-impala-cluster with the specified command line
-# arguments. An optional -build_type parameter can be passed to determine the 
build
-# type to use for the impalad instance.
+# Starts up an impalad with the specified command line arguments. An optional 
-build_type
+# parameter can be passed to determine the build type to use for the impalad 
instance.
 
 set -euo pipefail
 trap 'echo Error in $0 at line $LINENO: $(cd "'$PWD'" && awk "NR == $LINENO" 
$0)' ERR
@@ -28,7 +27,6 @@ BUILD_TYPE=latest
 IMPALAD_ARGS=""
 BINARY_BASE_DIR=${IMPALA_HOME}/be/build
 TOOL_PREFIX=""
-IN_PROCESS_BINARY=testutil/mini-impala-cluster
 IMPALAD_BINARY=service/impalad
 BINARY=${IMPALAD_BINARY}
 JVM_DEBUG_PORT=""
@@ -51,9 +49,6 @@ do
       echo "Invalid build type. Valid values are: debug, release"
       exit 1
       ;;
-    -in-process)
-      BINARY=${IN_PROCESS_BINARY}
-      ;;
     -gdb)
       echo "Starting Impala under gdb..."
       TOOL_PREFIX="gdb --args"

Reply via email to