Tabnine Logo
NamespaceServiceImpl.getKey
Code IndexAdd Tabnine to your IDE (free)

How to use
getKey
method
in
com.dremio.service.namespace.NamespaceServiceImpl

Best Java code snippets using com.dremio.service.namespace.NamespaceServiceImpl.getKey (Showing top 6 results out of 315)

origin: dremio/dremio-oss

 final NamespaceKey namespaceKey = new NamespaceKey(nameSpaceContainer.getFullPathList());
 searchIndex.index(NamespaceServiceImpl.getKey(namespaceKey), searchEntity);
 indexCount.getAndIncrement();
});
origin: dremio/dremio-oss

private DatasetConfig saveDataset(List<String> path, DatasetType type, Function<DatasetConfig, DatasetConfig> transformer) throws NamespaceException {
 final NamespaceKey key = new NamespaceKey(path);
 final byte[] binaryKey = NamespaceServiceImpl.getKey(key);
 final Optional<DatasetConfig> oldDataset = Optional.ofNullable(namespaceStore.get(binaryKey)).map(NameSpaceContainer::getDataset);
 final DatasetConfig datasetConfig = transformer.apply(new DatasetConfig()
   .setId(oldDataset.map(DatasetConfig::getId).orElse(new EntityId().setId(UUID.randomUUID().toString())))
   .setName(path.get(path.size() - 1))
   .setFullPathList(path)
   .setType(type)
   .setTag(oldDataset.map(DatasetConfig::getTag).orElse(null))
   .setOwner("dremio"));
 final NameSpaceContainer container = new NameSpaceContainer()
   .setType(NameSpaceContainer.Type.DATASET)
   .setFullPathList(path)
   .setDataset(datasetConfig);
 namespaceStore.put(binaryKey, container);
 return datasetConfig;
}
origin: dremio/dremio-oss

private void addHome(String name) throws Exception {
 final HomeConfig home = new HomeConfig()
  .setId(new EntityId().setId(UUID.randomUUID().toString()))
  .setOwner(name);
 final NameSpaceContainer container = new NameSpaceContainer()
   .setType(NameSpaceContainer.Type.HOME)
   .setFullPathList(Arrays.asList(name))
   .setHome(home);
 namespaceStore.put(NamespaceServiceImpl.getKey(new NamespaceKey("@" + name)), container);
}
origin: dremio/dremio-oss

 private void newS3Source(KVStore<byte[], NameSpaceContainer> namespace, String path, S3PluginConfig s3PluginConfig) {
  final List<String> fullPathList = Arrays.asList(path);

  final SourceConfig config = new SourceConfig()
   .setId(new EntityId(UUID.randomUUID().toString()))
   .setName(path)
   .setConnectionConf(s3PluginConfig);

  namespace.put(NamespaceServiceImpl.getKey(new NamespaceKey(fullPathList)),
   new NameSpaceContainer()
    .setFullPathList(fullPathList)
    .setType(NameSpaceContainer.Type.SOURCE)
    .setSource(config));
 }
}
origin: dremio/dremio-oss

private void addSource(String name) throws Exception {
 final SourceConfig source = new SourceConfig()
  .setId(new EntityId().setId(UUID.randomUUID().toString()))
  .setName(name)
  .setType("test")
  .setCtime(100L)
  .setAccelerationRefreshPeriod(REFRESH_PERIOD_MS)
  .setAccelerationGracePeriod(GRACE_PERIOD_MS)
  .setMetadataPolicy(new MetadataPolicy().setDatasetDefinitionExpireAfterMs(TimeUnit.DAYS.toMillis(1)));
 final NameSpaceContainer container = new NameSpaceContainer()
   .setType(NameSpaceContainer.Type.SOURCE)
   .setFullPathList(Arrays.asList(name))
   .setSource(source);
 namespaceStore.put(NamespaceServiceImpl.getKey(new NamespaceKey(name)), container);
}
origin: dremio/dremio-oss

private DatasetConfig addDataset(IndexedStore<byte[], NameSpaceContainer> namespace, IndexedStore<DatasetSplitId, DatasetSplit> splitsStore,
  String id, List<String> path, int splits) {
 DatasetConfig ds = new DatasetConfig()
   .setId(new EntityId(id))
   .setName(last(path))
   .setFullPathList(path)
   .setType(DatasetType.PHYSICAL_DATASET)
   .setReadDefinition(new ReadDefinition().setSplitVersion(42L));
 namespace.put(
   NamespaceServiceImpl.getKey(new NamespaceKey(path)),
   new NameSpaceContainer().setType(NameSpaceContainer.Type.DATASET).setFullPathList(path).setDataset(ds));
 for(int i = 0; i < splits; i++) {
  final String splitKey = Integer.toString(i);
  DatasetSplit split = new DatasetSplit()
    .setSplitVersion(42L)
    .setSplitKey(splitKey);
  // Generate an older dataset split id
  DatasetSplitId splitId = UnsafeDatasetSplitIdHelper.of(ds, splitKey);
  splitsStore.put(splitId, split);
 }
 return ds;
}
com.dremio.service.namespaceNamespaceServiceImplgetKey

Popular methods of NamespaceServiceImpl

  • <init>
  • compareSplits
    Return true if new splits are not same as old splits
  • deleteEntity
  • addOrUpdateDataset
  • addOrUpdateFolder
  • createOrUpdateEntity
    Helper method which creates a new entity or update the existing entity with given entity
  • createSourceFolders
  • deleteSplitOrphans
  • deleteSplits
  • doCreateOrUpdateEntity
  • doDeleteEntity
  • doGetEntities
  • doDeleteEntity,
  • doGetEntities,
  • doGetEntity,
  • doGetRootNamespaceContainers,
  • doList,
  • doRenameDataset,
  • doTraverseAndDeleteChildren,
  • doTryCreatePhysicalDataset,
  • ensureIdExistsTypeMatches

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top Sublime Text plugins
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