@@ -0,0 +1,2115 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.apache.hadoop.hive.metastore;%0A%0Aimport org.apache.hadoop.hive.conf.HiveConf;%0A%0A%0Apublic class TestRemoteHiveMetaStore extends TestHiveMetaStore %7B%0A  private static final String METASTORE_PORT = %2229083%22;%0A  private static boolean isServerRunning = false;%0A%0A  private static class RunMS implements Runnable %7B%0A%0A      @Override%0A      public void run() %7B%0A        System.out.println(%22Running metastore!%22);%0A        String %5B%5D args = new String %5B1%5D;%0A        args%5B0%5D = METASTORE_PORT;%0A        HiveMetaStore.main(args);%0A      %7D%0A%0A    %7D%0A%0A  @Override%0A  protected void setUp() throws Exception %7B%0A    super.setUp();%0A    if(isServerRunning) %7B%0A      return;%0A    %7D%0A    Thread t = new Thread(new RunMS());%0A    t.start();%0A%0A    // Wait a little bit for the metastore to start. Should probably have%0A    // a better way of detecting if the metastore has started?%0A    Thread.sleep(5000);%0A%0A    // hive.metastore.local should be defined in HiveConf%0A    hiveConf.set(%22hive.metastore.local%22, %22false%22);%0A    hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, %22thrift://localhost:%22 + METASTORE_PORT);%0A    hiveConf.setIntVar(HiveConf.ConfVars.METATORETHRIFTRETRIES, 3);%0A%0A    client = new HiveMetaStoreClient(hiveConf);%0A    isThriftClient = true;%0A%0A    // Now you have the client - run necessary tests.%0A    isServerRunning = true;%0A  %7D%0A%0A%7D%0A

Add TestRemoteHiveMetastor removed by mistake