Tabnine Logo
CubeMetastoreClient.getConf
Code IndexAdd Tabnine to your IDE (free)

How to use
getConf
method
in
org.apache.lens.cube.metadata.CubeMetastoreClient

Best Java code snippets using org.apache.lens.cube.metadata.CubeMetastoreClient.getConf (Showing top 6 results out of 315)

origin: apache/lens

public CubeMetastoreClient getCubeMetastoreClient() throws LensException {
 try {
  CubeMetastoreClient cubeClient = CubeMetastoreClient.getInstance(getHiveConf());
  // since cube client's configuration is a copy of the session conf passed, setting classloader in cube client's
  // configuration does not modify session conf's classloader.
  // We are doing this on the cubeClient instance than doing a copy of conf and setting classloader and pass it to
  // cube metastore client because CubeMetastoreClient would have been cached and refreshing the classloader
  // should not result in invalidating the CubeMetastoreClient cache.
  cubeClient.getConf().setClassLoader(getClassLoader());
  return cubeClient;
 } catch (HiveException e) {
  throw new LensException(e);
 }
}
origin: apache/lens

private void checkIfAuthorized() throws LensException {
 if (isAuthorizationEnabled()) {
  String currentdb = SessionState.get().getCurrentDatabase();
  AuthorizationUtil.isAuthorized(LensAuthorizer.get().getAuthorizer(), currentdb,
   LensPrivilegeObject.LensPrivilegeObjectType.DATABASE, ActionType.UPDATE, getConf(),
   SessionState.getSessionConf());
 }
}
origin: apache/lens

 Class clz = session.getCubeMetastoreClient().getConf().getClassByName(TestDatabaseResourceService.TEST_CLASS);
 clz = session.getCubeMetastoreClient().getConf().getClassByName(TestDatabaseResourceService.TEST_CLASS);
 assertNotNull(clz);
} catch (ClassNotFoundException cnf) {
origin: apache/lens

 Class testClass2 = session.getCubeMetastoreClient().getConf().getClassByName("ClassLoaderTestClass2");
 Class clz = session.getCubeMetastoreClient().getConf().getClassByName("ClassLoaderTestClass");
 loadedDBClass = true;
} catch (ClassNotFoundException cnf) {
 sessionService.acquire(sessionHandle);
 Class testClass2 = session.getCubeMetastoreClient().getConf().getClassByName("ClassLoaderTestClass2");
 Class clz = session.getCubeMetastoreClient().getConf().getClassByName("ClassLoaderTestClass");
 loadedDBClass = true;
} finally {
 sessionService.acquire(sessionHandle);
 Class testClass2 = session.getCubeMetastoreClient().getConf().getClassByName("ClassLoaderTestClass2");
 Class clz = session.getCubeMetastoreClient().getConf().getClassByName("ClassLoaderTestClass");
 loadedDBClass = true;
} catch (ClassNotFoundException cnf) {
origin: apache/lens

@BeforeClass
public static void setup() throws HiveException, AlreadyExistsException, LensException {
 SessionState.start(conf);
 conf.set(LensConfConstants.AUTHORIZER_CLASS, "org.apache.lens.cube.parse.MockAuthorizer");
 LensAuthorizer.get().init(conf);
 Database database = new Database();
 database.setName(TestCubeMetastoreClient.class.getSimpleName());
 Hive.get(conf).createDatabase(database);
 SessionState.get().setCurrentDatabase(TestCubeMetastoreClient.class.getSimpleName());
 client = CubeMetastoreClient.getInstance(conf);
 client.getConf().setBoolean(LensConfConstants.ENABLE_METASTORE_SCHEMA_AUTHORIZATION_CHECK, true);
 client.getConf().setBoolean(LensConfConstants.USER_GROUPS_BASED_AUTHORIZATION, true);
 SessionState.getSessionConf().set(LensConfConstants.SESSION_USER_GROUPS, "lens-auth-test1");
 defineCube(CUBE_NAME, CUBE_NAME_WITH_PROPS, DERIVED_CUBE_NAME, DERIVED_CUBE_NAME_WITH_PROPS);
 defineUberDims();
}
origin: apache/lens

assertEquals(Hive.get(client.getConf()).getTable(c1TableName).getParameters().get(
 getPartitionTimelineCachePresenceKey()), "true");
assertEquals(Hive.get(client.getConf()).getTable(c2TableName).getParameters().get(
 getPartitionTimelineCachePresenceKey()), "true");
assertEquals(Hive.get(client.getConf()).getTable(c1TableName).getParameters().get(
 getPartitionTimelineCachePresenceKey()), "true");
assertEquals(Hive.get(client.getConf()).getTable(c2TableName).getParameters().get(
 getPartitionTimelineCachePresenceKey()), "true");
org.apache.lens.cube.metadataCubeMetastoreClientgetConf

Javadoc

Get cube metastore client conf

Popular methods of CubeMetastoreClient

  • getInstance
    Get the instance of CubeMetastoreClient corresponding to HiveConf
  • getHiveTable
    Get the hive Table corresponding to the name
  • createCubeDimensionTable
  • createStorage
  • addPartitions
    batch addition
  • alterCube
  • alterCubeDimensionTable
  • alterCubeFactTable
  • alterDimension
    Alter dimension specified by the dimension name to new definition
  • alterSegmentation
  • createCube
    Create cube in metastore defined by Cube or DerivedCube object
  • createDimension
    Create dimension in metastore defined by Dimension object
  • createCube,
  • createDimension,
  • createSegmentation,
  • dropSegmentation,
  • dropStorageFromDim,
  • dropStorageFromFact,
  • getAllCubes,
  • getAllDimensionTables,
  • getAllFacts

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Kernel (java.awt.image)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now