org.apache.hadoop.hive.metastore.api.OpenTxnRequest Java Examples

The following examples show how to use org.apache.hadoop.hive.metastore.api.OpenTxnRequest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThriftHiveMetastoreClient.java    From presto with Apache License 2.0 5 votes vote down vote up
@Override
public long openTransaction(String user)
        throws TException
{
    OpenTxnRequest request = new OpenTxnRequest(1, user, hostname);
    return client.open_txns(request).getTxn_ids().get(0);
}
 
Example #2
Source File: FederatedHMSHandlerTest.java    From waggle-dance with Apache License 2.0 5 votes vote down vote up
@Test
public void open_txns() throws TException {
  OpenTxnRequest request = new OpenTxnRequest();
  OpenTxnsResponse expected = new OpenTxnsResponse();
  when(primaryClient.open_txns(request)).thenReturn(expected);
  OpenTxnsResponse result = handler.open_txns(request);
  assertThat(result, is(expected));
}
 
Example #3
Source File: FederatedHMSHandler.java    From waggle-dance with Apache License 2.0 4 votes vote down vote up
@Override
@Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME)
public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws TException {
  return getPrimaryClient().open_txns(rqst);
}
 
Example #4
Source File: CatalogThriftHiveMetastore.java    From metacat with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public OpenTxnsResponse open_txns(final OpenTxnRequest rqst) throws TException {
    throw unimplemented("open_txns", new Object[]{rqst});
}