congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
RetryingHMSHandler.getProxy
Code IndexAdd Tabnine to your IDE (free)

How to use
getProxy
method
in
org.apache.hadoop.hive.metastore.RetryingHMSHandler

Best Java code snippets using org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy (Showing top 14 results out of 315)

origin: apache/hive

private static IHMSHandler newRetryingHMSHandler(IHMSHandler baseHandler, Configuration conf,
  boolean local) throws MetaException {
 return RetryingHMSHandler.getProxy(conf, baseHandler, local);
}
origin: apache/hive

/**
 * Create retrying HMS handler for embedded metastore.
 *
 * <h1>IMPORTANT</h1>
 *
 * This method is called indirectly by HiveMetastoreClient and HiveMetaStoreClientPreCatalog
 * using reflection. It can not be removed and its arguments can't be changed without matching
 * change in HiveMetastoreClient and HiveMetaStoreClientPreCatalog.
 *
 * @param conf configuration to use
 * @throws MetaException
 */
static Iface newRetryingHMSHandler(Configuration conf)
  throws MetaException {
 HMSHandler baseHandler = new HiveMetaStore.HMSHandler("hive client", conf, false);
 return RetryingHMSHandler.getProxy(conf, baseHandler, true);
}
origin: apache/hive

@Test
public void testNoRetryInit() throws MetaException {
 IHMSHandler mockBaseHandler = Mockito.mock(IHMSHandler.class);
 Mockito.when(mockBaseHandler.getConf()).thenReturn(conf);
 Mockito.doNothing().when(mockBaseHandler).init();
 RetryingHMSHandler.getProxy(conf, mockBaseHandler, false);
 Mockito.verify(mockBaseHandler, Mockito.times(1)).init();
}
origin: apache/hive

@Test(expected = MetaException.class)
public void testRetriesLimit() throws MetaException {
 IHMSHandler mockBaseHandler = Mockito.mock(IHMSHandler.class);
 Mockito.when(mockBaseHandler.getConf()).thenReturn(conf);
 Mockito.doThrow(JDOException.class).when(mockBaseHandler).init();
 RetryingHMSHandler.getProxy(conf, mockBaseHandler, false);
 Mockito.verify(mockBaseHandler, Mockito.times(RETRY_ATTEMPTS)).init();
}
origin: apache/hive

@Test
public void testRetryInit() throws MetaException {
 IHMSHandler mockBaseHandler = Mockito.mock(IHMSHandler.class);
 Mockito.when(mockBaseHandler.getConf()).thenReturn(conf);
 Mockito
 .doThrow(JDOException.class)
 .doNothing()
 .when(mockBaseHandler).init();
 RetryingHMSHandler.getProxy(conf, mockBaseHandler, false);
 Mockito.verify(mockBaseHandler, Mockito.times(2)).init();
}
origin: apache/hive

 @Test
 public void testWrappedMetaExceptionRetry() throws MetaException {
  IHMSHandler mockBaseHandler = Mockito.mock(IHMSHandler.class);
  Mockito.when(mockBaseHandler.getConf()).thenReturn(conf);
  //JDOException wrapped in MetaException wrapped in InvocationException
  MetaException me = new MetaException("Dummy exception");
  me.initCause(new JDOException());
  InvocationTargetException ex = new InvocationTargetException(me);
  Mockito
  .doThrow(me)
  .doNothing()
  .when(mockBaseHandler).init();
  RetryingHMSHandler.getProxy(conf, mockBaseHandler, false);
  Mockito.verify(mockBaseHandler, Mockito.times(2)).init();
 }
}
origin: edu.berkeley.cs.shark/hive-metastore

public static IHMSHandler newHMSHandler(String name, HiveConf hiveConf) throws MetaException {
 return RetryingHMSHandler.getProxy(hiveConf, name);
}
origin: org.spark-project.hive/hive-metastore

public static IHMSHandler newRetryingHMSHandler(IHMSHandler baseHandler, HiveConf hiveConf,
  boolean local) throws MetaException {
 return RetryingHMSHandler.getProxy(hiveConf, baseHandler, local);
}
origin: com.facebook.presto.hive/hive-apache

public static IHMSHandler newRetryingHMSHandler(IHMSHandler baseHandler, HiveConf hiveConf,
  boolean local) throws MetaException {
 return RetryingHMSHandler.getProxy(hiveConf, baseHandler, local);
}
origin: org.apache.hive/hive-standalone-metastore

private static IHMSHandler newRetryingHMSHandler(IHMSHandler baseHandler, Configuration conf,
  boolean local) throws MetaException {
 return RetryingHMSHandler.getProxy(conf, baseHandler, local);
}
origin: org.apache.hive/hive-standalone-metastore

static Iface newRetryingHMSHandler(String name, Configuration conf, boolean local)
  throws MetaException {
 HMSHandler baseHandler = new HiveMetaStore.HMSHandler(name, conf, false);
 return RetryingHMSHandler.getProxy(conf, baseHandler, local);
}
origin: org.spark-project.hive/hive-metastore

public static Iface newRetryingHMSHandler(String name, HiveConf conf, boolean local)
  throws MetaException {
 HMSHandler baseHandler = new HiveMetaStore.HMSHandler(name, conf, false);
 return RetryingHMSHandler.getProxy(conf, baseHandler, local);
}
origin: com.facebook.presto.hive/hive-apache

public static Iface newRetryingHMSHandler(String name, HiveConf conf, boolean local)
  throws MetaException {
 HMSHandler baseHandler = new HiveMetaStore.HMSHandler(name, conf, false);
 return RetryingHMSHandler.getProxy(conf, baseHandler, local);
}
origin: Netflix/iceberg

private TServer thriftServer() throws IOException,
    TTransportException,
    MetaException,
    InvocationTargetException,
    NoSuchMethodException,
    IllegalAccessException,
    NoSuchFieldException {
 final TServerSocketKeepAlive socket = new TServerSocketKeepAlive(new TServerSocket(0));
 this.hiveConf = hiveConf(new Configuration(), socket.getServerSocket().getLocalPort());
 HiveMetaStore.HMSHandler baseHandler = new HiveMetaStore.HMSHandler("new db based metaserver", hiveConf);
 IHMSHandler handler = RetryingHMSHandler.getProxy(hiveConf, baseHandler, true);
 final TTransportFactory transportFactory = new TTransportFactory();
 final TSetIpAddressProcessor<IHMSHandler> processor = new TSetIpAddressProcessor<>(handler);
 TThreadPoolServer.Args args = new TThreadPoolServer.Args(socket)
     .processor(processor)
     .transportFactory(transportFactory)
     .protocolFactory(new TBinaryProtocol.Factory())
     .minWorkerThreads(3)
     .maxWorkerThreads(5);
 return new TThreadPoolServer(args);
}
org.apache.hadoop.hive.metastoreRetryingHMSHandlergetProxy

Popular methods of RetryingHMSHandler

  • <init>
  • getActiveConf
  • getConf
  • init
  • initMS
  • invoke
  • invokeInternal

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now