Search in sources :

Example 1 with HttpHandler

use of io.cdap.http.HttpHandler in project cdap by caskdata.

the class DatasetServiceTestBase method initializeAndStartService.

protected static void initializeAndStartService(CConfiguration cConf) throws Exception {
    // TODO: this whole method is a mess. Streamline it!
    injector = Guice.createInjector(new ConfigModule(cConf), RemoteAuthenticatorModules.getNoOpModule(), new InMemoryDiscoveryModule(), new NonCustomLocationUnitTestModule(), new NamespaceAdminTestModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new TransactionInMemoryModule(), new AuthorizationTestModule(), new StorageModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AbstractModule() {

        @Override
        protected void configure() {
            bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class).in(Singleton.class);
            bind(DatasetDefinitionRegistryFactory.class).to(DefaultDatasetDefinitionRegistryFactory.class).in(Scopes.SINGLETON);
            // through the injector, we only need RemoteDatasetFramework in these tests
            bind(RemoteDatasetFramework.class);
            bind(OwnerStore.class).to(InMemoryOwnerStore.class);
            bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
        }
    });
    AccessEnforcer authEnforcer = injector.getInstance(AccessEnforcer.class);
    AuthenticationContext authenticationContext = injector.getInstance(AuthenticationContext.class);
    transactionRunner = injector.getInstance(TransactionRunner.class);
    DiscoveryService discoveryService = injector.getInstance(DiscoveryService.class);
    discoveryServiceClient = injector.getInstance(DiscoveryServiceClient.class);
    dsFramework = injector.getInstance(RemoteDatasetFramework.class);
    // Tx Manager to support working with datasets
    txManager = injector.getInstance(TransactionManager.class);
    txManager.startAndWait();
    StructuredTableAdmin structuredTableAdmin = injector.getInstance(StructuredTableAdmin.class);
    StoreDefinition.createAllTables(structuredTableAdmin);
    TransactionSystemClient txSystemClient = injector.getInstance(TransactionSystemClient.class);
    TransactionSystemClientService txSystemClientService = new DelegatingTransactionSystemClientService(txSystemClient);
    NamespacePathLocator namespacePathLocator = injector.getInstance(NamespacePathLocator.class);
    SystemDatasetInstantiatorFactory datasetInstantiatorFactory = new SystemDatasetInstantiatorFactory(locationFactory, dsFramework, cConf);
    // ok to pass null, since the impersonator won't actually be called, if kerberos security is not enabled
    Impersonator impersonator = new DefaultImpersonator(cConf, null);
    DatasetAdminService datasetAdminService = new DatasetAdminService(dsFramework, cConf, locationFactory, datasetInstantiatorFactory, impersonator);
    ImmutableSet<HttpHandler> handlers = ImmutableSet.<HttpHandler>of(new DatasetAdminOpHTTPHandler(datasetAdminService));
    MetricsCollectionService metricsCollectionService = injector.getInstance(MetricsCollectionService.class);
    opExecutorService = new DatasetOpExecutorService(cConf, SConfiguration.create(), discoveryService, metricsCollectionService, handlers);
    opExecutorService.startAndWait();
    Map<String, DatasetModule> defaultModules = injector.getInstance(Key.get(new TypeLiteral<Map<String, DatasetModule>>() {
    }, Constants.Dataset.Manager.DefaultDatasetModules.class));
    ImmutableMap<String, DatasetModule> modules = ImmutableMap.<String, DatasetModule>builder().putAll(defaultModules).build();
    registryFactory = injector.getInstance(DatasetDefinitionRegistryFactory.class);
    inMemoryDatasetFramework = new InMemoryDatasetFramework(registryFactory, modules);
    DiscoveryExploreClient exploreClient = new DiscoveryExploreClient(discoveryServiceClient, authenticationContext);
    ExploreFacade exploreFacade = new ExploreFacade(exploreClient, cConf);
    namespaceAdmin = injector.getInstance(NamespaceAdmin.class);
    namespaceAdmin.create(NamespaceMeta.DEFAULT);
    ownerAdmin = injector.getInstance(OwnerAdmin.class);
    NamespaceQueryAdmin namespaceQueryAdmin = injector.getInstance(NamespaceQueryAdmin.class);
    DatasetTypeManager typeManager = new DatasetTypeManager(cConf, locationFactory, impersonator, transactionRunner);
    DatasetOpExecutor opExecutor = new InMemoryDatasetOpExecutor(dsFramework);
    DatasetInstanceManager instanceManager = new DatasetInstanceManager(transactionRunner);
    DatasetTypeService noAuthTypeService = new DefaultDatasetTypeService(typeManager, namespaceAdmin, namespacePathLocator, cConf, impersonator, txSystemClientService, transactionRunner, defaultModules);
    DatasetTypeService typeService = new AuthorizationDatasetTypeService(noAuthTypeService, authEnforcer, authenticationContext);
    instanceService = new DatasetInstanceService(typeService, noAuthTypeService, instanceManager, opExecutor, exploreFacade, namespaceQueryAdmin, ownerAdmin, authEnforcer, authenticationContext, new NoOpMetadataServiceClient());
    service = new DatasetService(cConf, SConfiguration.create(), discoveryService, discoveryServiceClient, metricsCollectionService, new HashSet<>(), typeService, instanceService);
    // Start dataset service, wait for it to be discoverable
    service.startAndWait();
    waitForService(Constants.Service.DATASET_EXECUTOR);
    waitForService(Constants.Service.DATASET_MANAGER);
    // this usually happens while creating a namespace, however not doing that in data fabric tests
    Locations.mkdirsIfNotExists(namespacePathLocator.get(NamespaceId.DEFAULT));
}
Also used : RemoteDatasetFramework(io.cdap.cdap.data2.datafabric.dataset.RemoteDatasetFramework) InMemoryDatasetOpExecutor(io.cdap.cdap.data2.datafabric.dataset.service.executor.InMemoryDatasetOpExecutor) AuthenticationContext(io.cdap.cdap.security.spi.authentication.AuthenticationContext) DiscoveryServiceClient(org.apache.twill.discovery.DiscoveryServiceClient) DatasetAdminOpHTTPHandler(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetAdminOpHTTPHandler) TransactionInMemoryModule(org.apache.tephra.runtime.TransactionInMemoryModule) NamespacePathLocator(io.cdap.cdap.common.namespace.NamespacePathLocator) NoOpMetricsCollectionService(io.cdap.cdap.common.metrics.NoOpMetricsCollectionService) ExploreFacade(io.cdap.cdap.explore.client.ExploreFacade) DatasetDefinitionRegistryFactory(io.cdap.cdap.data2.dataset2.DatasetDefinitionRegistryFactory) DefaultDatasetDefinitionRegistryFactory(io.cdap.cdap.data2.dataset2.DefaultDatasetDefinitionRegistryFactory) SystemDatasetRuntimeModule(io.cdap.cdap.data.runtime.SystemDatasetRuntimeModule) InMemoryDatasetFramework(io.cdap.cdap.data2.dataset2.InMemoryDatasetFramework) HashSet(java.util.HashSet) HttpHandler(io.cdap.http.HttpHandler) DatasetInstanceManager(io.cdap.cdap.data2.datafabric.dataset.instance.DatasetInstanceManager) NoOpMetricsCollectionService(io.cdap.cdap.common.metrics.NoOpMetricsCollectionService) MetricsCollectionService(io.cdap.cdap.api.metrics.MetricsCollectionService) AuthenticationContextModules(io.cdap.cdap.security.auth.context.AuthenticationContextModules) DefaultOwnerAdmin(io.cdap.cdap.security.impersonation.DefaultOwnerAdmin) OwnerAdmin(io.cdap.cdap.security.impersonation.OwnerAdmin) NamespaceAdmin(io.cdap.cdap.common.namespace.NamespaceAdmin) NonCustomLocationUnitTestModule(io.cdap.cdap.common.guice.NonCustomLocationUnitTestModule) DatasetTypeManager(io.cdap.cdap.data2.datafabric.dataset.type.DatasetTypeManager) TransactionRunner(io.cdap.cdap.spi.data.transaction.TransactionRunner) TransactionManager(org.apache.tephra.TransactionManager) NoOpMetadataServiceClient(io.cdap.cdap.data2.metadata.writer.NoOpMetadataServiceClient) AuthorizationEnforcementModule(io.cdap.cdap.security.authorization.AuthorizationEnforcementModule) DelegatingTransactionSystemClientService(io.cdap.cdap.data2.transaction.DelegatingTransactionSystemClientService) InMemoryDiscoveryModule(io.cdap.cdap.common.guice.InMemoryDiscoveryModule) StorageModule(io.cdap.cdap.data.runtime.StorageModule) NamespaceAdminTestModule(io.cdap.cdap.common.guice.NamespaceAdminTestModule) ConfigModule(io.cdap.cdap.common.guice.ConfigModule) StructuredTableAdmin(io.cdap.cdap.spi.data.StructuredTableAdmin) DatasetModule(io.cdap.cdap.api.dataset.module.DatasetModule) TransactionSystemClient(org.apache.tephra.TransactionSystemClient) DiscoveryExploreClient(io.cdap.cdap.explore.client.DiscoveryExploreClient) SystemDatasetInstantiatorFactory(io.cdap.cdap.data.dataset.SystemDatasetInstantiatorFactory) TypeLiteral(com.google.inject.TypeLiteral) AccessEnforcer(io.cdap.cdap.security.spi.authorization.AccessEnforcer) NamespaceQueryAdmin(io.cdap.cdap.common.namespace.NamespaceQueryAdmin) DefaultDatasetDefinitionRegistryFactory(io.cdap.cdap.data2.dataset2.DefaultDatasetDefinitionRegistryFactory) DelegatingTransactionSystemClientService(io.cdap.cdap.data2.transaction.DelegatingTransactionSystemClientService) TransactionSystemClientService(io.cdap.cdap.data2.transaction.TransactionSystemClientService) DiscoveryService(org.apache.twill.discovery.DiscoveryService) DatasetAdminService(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetAdminService) DatasetOpExecutor(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutor) InMemoryDatasetOpExecutor(io.cdap.cdap.data2.datafabric.dataset.service.executor.InMemoryDatasetOpExecutor) AuthorizationTestModule(io.cdap.cdap.security.authorization.AuthorizationTestModule) DefaultImpersonator(io.cdap.cdap.security.impersonation.DefaultImpersonator) Impersonator(io.cdap.cdap.security.impersonation.Impersonator) DefaultImpersonator(io.cdap.cdap.security.impersonation.DefaultImpersonator) OwnerStore(io.cdap.cdap.security.impersonation.OwnerStore) InMemoryOwnerStore(io.cdap.cdap.security.impersonation.InMemoryOwnerStore) AbstractModule(com.google.inject.AbstractModule) DatasetOpExecutorService(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutorService)

Example 2 with HttpHandler

use of io.cdap.http.HttpHandler in project cdap by caskdata.

the class HttpHandlerGeneratorTest method testHttpHandlerGenerator.

@Test
public void testHttpHandlerGenerator() throws Exception {
    HttpHandlerFactory factory = new HttpHandlerFactory("/prefix", TransactionControl.IMPLICIT);
    HttpHandler httpHandler = factory.createHttpHandler(TypeToken.of(MyHttpHandler.class), new AbstractDelegatorContext<MyHttpHandler>() {

        @Override
        protected MyHttpHandler createHandler() {
            return new MyHttpHandler();
        }
    }, new NoopMetricsContext());
    HttpHandler httpHandlerWithoutAnnotation = factory.createHttpHandler(TypeToken.of(NoAnnotationHandler.class), new AbstractDelegatorContext<NoAnnotationHandler>() {

        @Override
        protected NoAnnotationHandler createHandler() {
            return new NoAnnotationHandler();
        }
    }, new NoopMetricsContext());
    NettyHttpService service = NettyHttpService.builder("test-handler-generator").setHttpHandlers(httpHandler, httpHandlerWithoutAnnotation).build();
    service.start();
    try {
        InetSocketAddress bindAddress = service.getBindAddress();
        // Make a GET call
        URLConnection urlConn = new URL(String.format("http://%s:%d/prefix/p2/handle", bindAddress.getHostName(), bindAddress.getPort())).openConnection();
        urlConn.setReadTimeout(2000);
        Assert.assertEquals("Hello World", new String(ByteStreams.toByteArray(urlConn.getInputStream()), Charsets.UTF_8));
        // Make a POST call
        urlConn = new URL(String.format("http://%s:%d/prefix/p2/echo/test", bindAddress.getHostName(), bindAddress.getPort())).openConnection();
        urlConn.setReadTimeout(2000);
        urlConn.setDoOutput(true);
        ByteStreams.copy(ByteStreams.newInputStreamSupplier("Hello".getBytes(Charsets.UTF_8)), urlConn.getOutputStream());
        Assert.assertEquals("Hello test", new String(ByteStreams.toByteArray(urlConn.getInputStream()), Charsets.UTF_8));
        // Ensure that even though the handler did not have a class-level annotation, we still prefix the path that it
        // handles by "/prefix"
        urlConn = new URL(String.format("http://%s:%d/prefix/ping", bindAddress.getHostName(), bindAddress.getPort())).openConnection();
        urlConn.setReadTimeout(2000);
        Assert.assertEquals("OK", new String(ByteStreams.toByteArray(urlConn.getInputStream()), Charsets.UTF_8));
        // Call to a method that raise exception
        urlConn = new URL(String.format("http://%s:%d/prefix/p2/exception", bindAddress.getHostName(), bindAddress.getPort())).openConnection();
        Assert.assertEquals(500, ((HttpURLConnection) urlConn).getResponseCode());
        Assert.assertEquals("Exception occurred while handling request: exception", new String(ByteStreams.toByteArray(((HttpURLConnection) urlConn).getErrorStream()), "UTF-8"));
        urlConn = new URL(String.format("http://%s:%d/prefix/p2/exceptionNoTx", bindAddress.getHostName(), bindAddress.getPort())).openConnection();
        Assert.assertEquals(500, ((HttpURLConnection) urlConn).getResponseCode());
        Assert.assertEquals("Exception occurred while handling request: exceptionNoTx", new String(ByteStreams.toByteArray(((HttpURLConnection) urlConn).getErrorStream()), "UTF-8"));
    } finally {
        service.stop();
    }
}
Also used : HttpHandler(io.cdap.http.HttpHandler) InetSocketAddress(java.net.InetSocketAddress) NoopMetricsContext(io.cdap.cdap.api.metrics.NoopMetricsContext) HttpURLConnection(java.net.HttpURLConnection) URLConnection(java.net.URLConnection) URL(java.net.URL) NettyHttpService(io.cdap.http.NettyHttpService) Test(org.junit.Test)

Example 3 with HttpHandler

use of io.cdap.http.HttpHandler in project cdap by caskdata.

the class SupportBundleServiceModule method configure.

@Override
protected void configure() {
    Multibinder<HttpHandler> handlerBinder = Multibinder.newSetBinder(binder(), HttpHandler.class, Names.named(Constants.SupportBundle.HANDLERS_NAME));
    CommonHandlers.add(handlerBinder);
    handlerBinder.addBinding().to(SupportBundleHttpHandler.class);
    handlerBinder.addBinding().to(HealthCheckHttpHandler.class);
    bind(SupportBundleInternalService.class).in(Scopes.SINGLETON);
    Multibinder<SupportBundleTaskFactory> supportBundleTaskFactoryMultibinder = Multibinder.newSetBinder(binder(), SupportBundleTaskFactory.class, Names.named(Constants.SupportBundle.TASK_FACTORY));
    supportBundleTaskFactoryMultibinder.addBinding().to(SupportBundlePipelineInfoTaskFactory.class);
    supportBundleTaskFactoryMultibinder.addBinding().to(SupportBundleSystemLogTaskFactory.class);
    supportBundleTaskFactoryMultibinder.addBinding().to(SupportBundleK8sHealthCheckTaskFactory.class);
    install(new HealthCheckModule());
}
Also used : HealthCheckHttpHandler(io.cdap.cdap.gateway.handlers.HealthCheckHttpHandler) SupportBundleHttpHandler(io.cdap.cdap.support.handlers.SupportBundleHttpHandler) HttpHandler(io.cdap.http.HttpHandler) SupportBundleInternalService(io.cdap.cdap.support.internal.app.services.SupportBundleInternalService) HealthCheckModule(io.cdap.cdap.common.guice.HealthCheckModule) SupportBundleTaskFactory(io.cdap.cdap.support.task.factory.SupportBundleTaskFactory)

Example 4 with HttpHandler

use of io.cdap.http.HttpHandler in project cdap by caskdata.

the class HttpHandlerFactory method validateHttpHandler.

/**
 * Validates the given set of user service handlers.
 *
 * @param handlers set of service handlers to validate.
 * @param <T> type of the handler
 * @throws IllegalArgumentException if any of the service handler is not valid
 */
public <T> void validateHttpHandler(Iterable<T> handlers) {
    List<HttpHandler> httpHandlers = new ArrayList<>();
    NoopMetricsContext metricsContext = new NoopMetricsContext();
    for (T handler : handlers) {
        try {
            @SuppressWarnings("unchecked") TypeToken<T> type = (TypeToken<T>) TypeToken.of(handler.getClass());
            httpHandlers.add(createHttpHandler(type, new VerificationDelegateContext<>(handler), metricsContext));
        } catch (Exception e) {
            throw new IllegalArgumentException("Invalid http handler class " + handler.getClass().getName());
        }
    }
    try {
        // Constructs a NettyHttpService, to verify that the handlers passed in by the user are valid.
        NettyHttpService.builder("service-configurer").setHttpHandlers(httpHandlers).build();
    } catch (Exception e) {
        throw new IllegalArgumentException("Invalid http handler", e);
    }
}
Also used : HttpHandler(io.cdap.http.HttpHandler) TypeToken(com.google.common.reflect.TypeToken) ArrayList(java.util.ArrayList) NoopMetricsContext(io.cdap.cdap.api.metrics.NoopMetricsContext)

Example 5 with HttpHandler

use of io.cdap.http.HttpHandler in project cdap by caskdata.

the class DataSetServiceModules method getStandaloneModules.

@Override
public Module getStandaloneModules() {
    return new AbstractModule() {

        @Override
        protected void configure() {
            // Add the system dataset runtime module as public binding so that adding bindings could be added
            install(new SystemDatasetRuntimeModule().getStandaloneModules());
            install(new PrivateModule() {

                @Override
                protected void configure() {
                    bind(DatasetDefinitionRegistryFactory.class).to(DefaultDatasetDefinitionRegistryFactory.class).in(Scopes.SINGLETON);
                    bind(DatasetFramework.class).annotatedWith(Names.named("datasetMDS")).toProvider(DatasetMdsProvider.class).in(Singleton.class);
                    expose(DatasetFramework.class).annotatedWith(Names.named("datasetMDS"));
                    Multibinder.newSetBinder(binder(), DatasetMetricsReporter.class).addBinding().to(LevelDBDatasetMetricsReporter.class);
                    bind(DatasetService.class);
                    expose(DatasetService.class);
                    Named datasetUserName = Names.named(Constants.Service.DATASET_EXECUTOR);
                    Multibinder<HttpHandler> handlerBinder = Multibinder.newSetBinder(binder(), HttpHandler.class, datasetUserName);
                    CommonHandlers.add(handlerBinder);
                    handlerBinder.addBinding().to(DatasetAdminOpHTTPHandler.class);
                    bind(DatasetOpExecutorService.class).in(Scopes.SINGLETON);
                    expose(DatasetOpExecutorService.class);
                    bind(DatasetOpExecutor.class).to(RemoteDatasetOpExecutor.class);
                    expose(DatasetOpExecutor.class);
                    bind(DatasetTypeService.class).annotatedWith(Names.named(NOAUTH_DATASET_TYPE_SERVICE)).to(DefaultDatasetTypeService.class);
                    bind(DatasetTypeService.class).to(AuthorizationDatasetTypeService.class);
                    expose(DatasetTypeService.class);
                }
            });
        }
    };
}
Also used : Named(com.google.inject.name.Named) HttpHandler(io.cdap.http.HttpHandler) DatasetAdminOpHTTPHandler(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetAdminOpHTTPHandler) Multibinder(com.google.inject.multibindings.Multibinder) DatasetService(io.cdap.cdap.data2.datafabric.dataset.service.DatasetService) DatasetOpExecutor(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutor) RemoteDatasetOpExecutor(io.cdap.cdap.data2.datafabric.dataset.service.executor.RemoteDatasetOpExecutor) DatasetTypeService(io.cdap.cdap.data2.datafabric.dataset.service.DatasetTypeService) DefaultDatasetTypeService(io.cdap.cdap.data2.datafabric.dataset.service.DefaultDatasetTypeService) AuthorizationDatasetTypeService(io.cdap.cdap.data2.datafabric.dataset.service.AuthorizationDatasetTypeService) AuthorizationDatasetTypeService(io.cdap.cdap.data2.datafabric.dataset.service.AuthorizationDatasetTypeService) AbstractModule(com.google.inject.AbstractModule) DatasetDefinitionRegistryFactory(io.cdap.cdap.data2.dataset2.DatasetDefinitionRegistryFactory) DefaultDatasetDefinitionRegistryFactory(io.cdap.cdap.data2.dataset2.DefaultDatasetDefinitionRegistryFactory) Singleton(com.google.inject.Singleton) DatasetOpExecutorService(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutorService) DefaultDatasetTypeService(io.cdap.cdap.data2.datafabric.dataset.service.DefaultDatasetTypeService) HBaseDatasetMetricsReporter(io.cdap.cdap.data2.metrics.HBaseDatasetMetricsReporter) DatasetMetricsReporter(io.cdap.cdap.data2.metrics.DatasetMetricsReporter) LevelDBDatasetMetricsReporter(io.cdap.cdap.data2.metrics.LevelDBDatasetMetricsReporter) RemoteDatasetOpExecutor(io.cdap.cdap.data2.datafabric.dataset.service.executor.RemoteDatasetOpExecutor) LevelDBDatasetMetricsReporter(io.cdap.cdap.data2.metrics.LevelDBDatasetMetricsReporter) PrivateModule(com.google.inject.PrivateModule)

Aggregations

HttpHandler (io.cdap.http.HttpHandler)12 AbstractModule (com.google.inject.AbstractModule)5 NoopMetricsContext (io.cdap.cdap.api.metrics.NoopMetricsContext)5 DatasetAdminOpHTTPHandler (io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetAdminOpHTTPHandler)5 DatasetOpExecutor (io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutor)5 DatasetOpExecutorService (io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutorService)5 DatasetDefinitionRegistryFactory (io.cdap.cdap.data2.dataset2.DatasetDefinitionRegistryFactory)5 DefaultDatasetDefinitionRegistryFactory (io.cdap.cdap.data2.dataset2.DefaultDatasetDefinitionRegistryFactory)5 PrivateModule (com.google.inject.PrivateModule)4 Singleton (com.google.inject.Singleton)4 AuthorizationDatasetTypeService (io.cdap.cdap.data2.datafabric.dataset.service.AuthorizationDatasetTypeService)4 DatasetService (io.cdap.cdap.data2.datafabric.dataset.service.DatasetService)4 DatasetTypeService (io.cdap.cdap.data2.datafabric.dataset.service.DatasetTypeService)4 DefaultDatasetTypeService (io.cdap.cdap.data2.datafabric.dataset.service.DefaultDatasetTypeService)4 RemoteDatasetOpExecutor (io.cdap.cdap.data2.datafabric.dataset.service.executor.RemoteDatasetOpExecutor)4 Multibinder (com.google.inject.multibindings.Multibinder)3 Named (com.google.inject.name.Named)3 DatasetMetricsReporter (io.cdap.cdap.data2.metrics.DatasetMetricsReporter)3 HBaseDatasetMetricsReporter (io.cdap.cdap.data2.metrics.HBaseDatasetMetricsReporter)3 LevelDBDatasetMetricsReporter (io.cdap.cdap.data2.metrics.LevelDBDatasetMetricsReporter)3