HiveClient hiveClient = injector.getInstance(HiveClient.class);
ImmutableClassToInstanceMap.Builder<Object> builder = ImmutableClassToInstanceMap.builder();
builder.put(ConnectorMetadata.class, new ClassLoaderSafeConnectorMetadata(hiveClient, classLoader));
builder.put(ConnectorSplitManager.class, new ClassLoaderSafeConnectorSplitManager(hiveClient, classLoader));
builder.put(ConnectorRecordSetProvider.class, new ClassLoaderSafeConnectorRecordSetProvider(hiveClient, classLoader));
builder.put(ConnectorRecordSinkProvider.class, new ClassLoaderSafeConnectorRecordSinkProvider(hiveClient, classLoader));
builder.put(ConnectorHandleResolver.class, new ClassLoaderSafeConnectorHandleResolver(hiveClient, classLoader));
builder.put(ConnectorOutputHandleResolver.class, new ClassLoaderSafeConnectorOutputHandleResolver(hiveClient, classLoader));
return new HiveConnector(builder.build());