@Test public void hiveTableCreated() { underTest.handleHiveTableCreated(ROAD_NAME, TABLE_NAME, PARTITION_COLUMN_NAME, BASE_LOCATION); verify(notificationHandler).send(hiveTableCreatedCaptor.capture()); HiveTableCreated notification = hiveTableCreatedCaptor.getValue(); assertThat(notification.getDatabaseName(), is(DATABASE_NAME)); assertThat(notification.getPartitionColumnName(), is(PARTITION_COLUMN_NAME)); assertThat(notification.getBaseLocation(), is(BASE_LOCATION)); assertThat(notification.getMetastoreUris(), is(HIVE_METASTORE_URIS)); assertThat(notification.getProtocolVersion(), is("1.0")); assertThat(notification.getType(), is(RoadNotificationType.HIVE_TABLE_CREATED)); assertThat(notification.getRoadName(), is(ROAD_NAME)); assertThat(notification.getTableName(), is(TABLE_NAME)); }
public void handleHiveTableCreated( String roadName, String tableName, String partitionColumnName, String baseLocation) { notificationHandler.send(HiveTableCreated .builder() .roadName(roadName) .tableName(tableName) .databaseName(hiveDatabase) .metastoreUris(hiveMetaStoreUris) .partitionColumnName(partitionColumnName) .baseLocation(baseLocation) .build()); }
HiveNotificationHandler { public void handleHiveTableCreated( String roadName, String tableName, String partitionColumnName, String baseLocation) { notificationHandler.send(HiveTableCreated .builder() .roadName(roadName) .tableName(tableName) .databaseName(hiveDatabase) .metastoreUris(hiveMetaStoreUris) .partitionColumnName(partitionColumnName) .baseLocation(baseLocation) .build()); } }
HiveNotificationHandler { public void handleHiveTableCreated( String roadName, String tableName, String partitionColumnName, String baseLocation) { notificationHandler.send(HiveTableCreated .builder() .roadName(roadName) .tableName(tableName) .databaseName(hiveDatabase) .metastoreUris(hiveMetaStoreUris) .partitionColumnName(partitionColumnName) .baseLocation(baseLocation) .build()); } @Autowired  HiveNotificationHandler(
      NotificationHandler notificationHandler,
      @Value("${hive.metastore.uris}") String hiveMetaStoreUris,
      @Value("${hive.database}") String hiveDatabase); }
HiveNotificationHandler { public void handleHiveTableCreated( String roadName, String tableName, String partitionColumnName, String baseLocation) { notificationHandler.send(HiveTableCreated .builder() .roadName(roadName) .tableName(tableName) .databaseName(hiveDatabase) .metastoreUris(hiveMetaStoreUris) .partitionColumnName(partitionColumnName) .baseLocation(baseLocation) .build()); } @Autowired  HiveNotificationHandler(
      NotificationHandler notificationHandler,
      @Value("${hive.metastore.uris}") String hiveMetaStoreUris,
      @Value("${hive.database}") String hiveDatabase); void handlePartitionCreated(String roadName, Partition partition, String partitionSpec, long recordCount); void handleHiveTableCreated(
      String roadName,
      String tableName,
      String partitionColumnName,
      String baseLocation); }
HiveNotificationHandler { public void handleHiveTableCreated( String roadName, String tableName, String partitionColumnName, String baseLocation) { notificationHandler.send(HiveTableCreated .builder() .roadName(roadName) .tableName(tableName) .databaseName(hiveDatabase) .metastoreUris(hiveMetaStoreUris) .partitionColumnName(partitionColumnName) .baseLocation(baseLocation) .build()); } @Autowired  HiveNotificationHandler(
      NotificationHandler notificationHandler,
      @Value("${hive.metastore.uris}") String hiveMetaStoreUris,
      @Value("${hive.database}") String hiveDatabase); void handlePartitionCreated(String roadName, Partition partition, String partitionSpec, long recordCount); void handleHiveTableCreated(
      String roadName,
      String tableName,
      String partitionColumnName,
      String baseLocation);  }