congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IMetadataManager.addDataset
Code IndexAdd Tabnine to your IDE (free)

How to use
addDataset
method
in
org.apache.asterix.metadata.api.IMetadataManager

Best Java code snippets using org.apache.asterix.metadata.api.IMetadataManager.addDataset (Showing top 4 results out of 315)

origin: apache/asterixdb

/**
 * Inserts a metadata dataset to the physical dataset index Should be performed
 * on a bootstrap of a new universe
 *
 * @param mdTxnCtx
 * @param indexes
 * @throws AlgebricksException
 */
public static void insertMetadataDatasets(MetadataTransactionContext mdTxnCtx, IMetadataIndex[] indexes)
    throws AlgebricksException {
  for (int i = 0; i < indexes.length; i++) {
    IDatasetDetails id = new InternalDatasetDetails(FileStructure.BTREE, PartitioningStrategy.HASH,
        indexes[i].getPartitioningExpr(), indexes[i].getPartitioningExpr(), null,
        indexes[i].getPartitioningExprType(), false, null);
    MetadataManager.INSTANCE.addDataset(mdTxnCtx,
        new Dataset(indexes[i].getDataverseName(), indexes[i].getIndexedDatasetName(),
            indexes[i].getDataverseName(), indexes[i].getPayloadRecordType().getTypeName(),
            indexes[i].getNodeGroupName(), GlobalConfig.DEFAULT_COMPACTION_POLICY_NAME,
            GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES, id, new HashMap<String, String>(),
            DatasetType.INTERNAL, indexes[i].getDatasetId().getId(), MetadataUtil.PENDING_NO_OP));
  }
  if (LOGGER.isInfoEnabled()) {
    LOGGER.info("Finished inserting initial datasets.");
  }
}
origin: apache/asterixdb

MetadataManager.INSTANCE.addDataset(mdTxnCtx.getValue(),
    new Dataset(dataverseName, datasetName, getItemTypeDataverseName(), getItemTypeName(),
        getMetaItemTypeDataverseName(), getMetaItemTypeName(), getNodeGroupName(),
MetadataManager.INSTANCE.addDataset(mdTxnCtx.getValue(),
    new Dataset(dataverseName, datasetName, getItemTypeDataverseName(), getItemTypeName(),
        getNodeGroupName(), getCompactionPolicy(), getCompactionPolicyProperties(),
origin: apache/asterixdb

  private void addDataset(ICcApplicationContext appCtx, Dataset source, int datasetPostfix, boolean abort)
      throws Exception {
    Dataset dataset = new Dataset(source.getDataverseName(), "ds_" + datasetPostfix, source.getDataverseName(),
        source.getDatasetType().name(), source.getNodeGroupName(), NoMergePolicyFactory.NAME, null,
        source.getDatasetDetails(), source.getHints(), DatasetConfig.DatasetType.INTERNAL, datasetPostfix, 0);
    MetadataProvider metadataProvider = new MetadataProvider(appCtx, null);
    final MetadataTransactionContext writeTxn = MetadataManager.INSTANCE.beginTransaction();
    metadataProvider.setMetadataTxnContext(writeTxn);
    try {
      MetadataManager.INSTANCE.addDataset(writeTxn, dataset);
      if (abort) {
        MetadataManager.INSTANCE.abortTransaction(writeTxn);
      } else {
        MetadataManager.INSTANCE.commitTransaction(writeTxn);
      }
    } finally {
      metadataProvider.getLocks().unlock();
    }
  }
}
origin: apache/asterixdb

      datasetDetails, dd.getHints(), dsType, DatasetIdFactory.generateDatasetId(),
      MetadataUtil.PENDING_ADD_OP, compressionScheme);
  MetadataManager.INSTANCE.addDataset(metadataProvider.getMetadataTxnContext(), dataset);
  if (dd.getDatasetType() == DatasetType.INTERNAL) {
    JobSpecification jobSpec = DatasetUtil.createDatasetJobSpec(dataset, metadataProvider);
  MetadataManager.INSTANCE.addDataset(metadataProvider.getMetadataTxnContext(), dataset);
  MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
} catch (Exception e) {
org.apache.asterix.metadata.apiIMetadataManageraddDataset

Javadoc

Inserts a new dataset into the metadata.

Popular methods of IMetadataManager

  • abortTransaction
    Aborts a remote transaction running on the metadata node.
  • addNodegroup
    Inserts a new node group.
  • beginTransaction
    Begins a transaction on the metadata node.
  • commitTransaction
    Commits a remote transaction on the metadata node.
  • dropNodegroup
    Deletes a node group.
  • getDatatype
    Retrieves the datatype with given name in given dataverse.
  • getFunction
  • getIndex
    Retrieves the index with given name, in given dataverse and dataset.
  • getNodegroup
    Retrieves a node group.
  • addAdapter
  • addDatatype
    Inserts a datatype.
  • addDataverse
    Inserts a new dataverse into the metadata.
  • addDatatype,
  • addDataverse,
  • addFeedPolicy,
  • dropDataset,
  • dropDataverse,
  • dropExternalFile,
  • dropIndex,
  • getCompactionPolicy,
  • getDataset

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JTable (javax.swing)
  • CodeWhisperer alternatives
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