Java Code Examples for org.apache.hadoop.hive.metastore.api.FireEventRequest

The following examples show how to use org.apache.hadoop.hive.metastore.api.FireEventRequest. These examples are extracted from open source projects. 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 Project: waggle-dance   Source File: DatabaseMappingImplTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void transformInboundFireEventRequest() throws Exception {
  FireEventRequest fireEventRequest = new FireEventRequest();
  fireEventRequest.setDbName(DB_NAME);
  FireEventRequest result = databaseMapping.transformInboundFireEventRequest(fireEventRequest);
  assertThat(result, is(sameInstance(fireEventRequest)));
  assertThat(result.getDbName(), is(IN_DB_NAME));
}
 
Example 2
Source Project: waggle-dance   Source File: FederatedHMSHandlerTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void fire_listener_event() throws TException {
  FireEventRequest request = new FireEventRequest();
  request.setDbName(DB_P);
  FireEventRequest inboundRequest = new FireEventRequest();
  FireEventResponse expected = new FireEventResponse();
  when(primaryMapping.transformInboundFireEventRequest(request)).thenReturn(inboundRequest);
  when(primaryClient.fire_listener_event(inboundRequest)).thenReturn(expected);
  FireEventResponse result = handler.fire_listener_event(request);
  assertThat(result, is(expected));
}
 
Example 3
public FireEventResponse fireListenerEvent(FireEventRequest fireEventRequest) throws TException {
  throw new UnsupportedOperationException("fireListenerEvent is not supported");
}
 
Example 4
@Override
public FireEventResponse fireListenerEvent(FireEventRequest fireEventRequest) throws TException {
  return glueMetastoreClientDelegate.fireListenerEvent(fireEventRequest);
}
 
Example 5
@Override
public FireEventResponse fireListenerEvent(FireEventRequest fireEventRequest) throws TException {
  return glueMetastoreClientDelegate.fireListenerEvent(fireEventRequest);
}
 
Example 6
Source Project: waggle-dance   Source File: DatabaseMappingImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public FireEventRequest transformInboundFireEventRequest(FireEventRequest rqst) {
  rqst.setDbName(metaStoreMapping.transformInboundDatabaseName(rqst.getDbName()));
  return rqst;
}
 
Example 7
Source Project: waggle-dance   Source File: IdentityMapping.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public FireEventRequest transformInboundFireEventRequest(FireEventRequest rqst) {
  return rqst;
}
 
Example 8
Source Project: waggle-dance   Source File: FederatedHMSHandler.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME)
public FireEventResponse fire_listener_event(FireEventRequest rqst) throws TException {
  DatabaseMapping mapping = databaseMappingService.databaseMapping(rqst.getDbName());
  return mapping.getClient().fire_listener_event(mapping.transformInboundFireEventRequest(rqst));
}
 
Example 9
Source Project: waggle-dance   Source File: IdentityMappingTest.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void transformInboundFireEventRequest() throws Exception {
  FireEventRequest fireEventRequest = new FireEventRequest();
  FireEventRequest result = databaseMapping.transformInboundFireEventRequest(fireEventRequest);
  assertThat(result, is(sameInstance(fireEventRequest)));
}
 
Example 10
Source Project: metacat   Source File: CatalogThriftHiveMetastore.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public FireEventResponse fire_listener_event(final FireEventRequest rqst) throws TException {
    throw unimplemented("fire_listener_event", new Object[]{rqst});
}
 
Example 11
Source Project: waggle-dance   Source File: DatabaseMapping.java    License: Apache License 2.0 votes vote down vote up
FireEventRequest transformInboundFireEventRequest(FireEventRequest request);