Tabnine Logo
IMetadataManager.getFunction
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/asterixdb

private static Function lookupUserDefinedFunctionDecl(MetadataTransactionContext mdTxnCtx,
    FunctionSignature signature) throws AlgebricksException {
  if (signature.getNamespace() == null) {
    return null;
  }
  return MetadataManager.INSTANCE.getFunction(mdTxnCtx, signature);
}
origin: apache/asterixdb

    MetadataManager.INSTANCE.getFunction(metadataProvider.getMetadataTxnContext(), signature);
if (function == null) {
  return null;
origin: apache/asterixdb

protected void handleFunctionDropStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
  FunctionDropStatement stmtDropFunction = (FunctionDropStatement) stmt;
  SourceLocation sourceLoc = stmtDropFunction.getSourceLocation();
  FunctionSignature signature = stmtDropFunction.getFunctionSignature();
  signature.setNamespace(getActiveDataverseName(signature.getNamespace()));
  MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
  metadataProvider.setMetadataTxnContext(mdTxnCtx);
  MetadataLockUtil.functionStatementBegin(lockManager, metadataProvider.getLocks(), signature.getNamespace(),
      signature.getNamespace() + "." + signature.getName());
  try {
    Function function = MetadataManager.INSTANCE.getFunction(mdTxnCtx, signature);
    // If function == null && stmtDropFunction.getIfExists() == true, commit txn directly.
    if (function == null && !stmtDropFunction.getIfExists()) {
      throw new CompilationException(ErrorCode.UNKNOWN_FUNCTION, sourceLoc, signature);
    } else if (function != null) {
      if (isFunctionUsed(mdTxnCtx, signature, null)) {
        throw new MetadataException(ErrorCode.METADATA_DROP_FUCTION_IN_USE, sourceLoc, signature);
      } else {
        MetadataManager.INSTANCE.dropFunction(mdTxnCtx, signature);
      }
    }
    MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
  } catch (Exception e) {
    abort(e, e, mdTxnCtx);
    throw e;
  } finally {
    metadataProvider.getLocks().unlock();
  }
}
origin: apache/asterixdb

List<FunctionSignature> appliedFunctions = cfs.getAppliedFunctions();
for (FunctionSignature func : appliedFunctions) {
  if (MetadataManager.INSTANCE.getFunction(mdTxnCtx, func) == null) {
    throw new CompilationException(ErrorCode.FEED_CONNECT_FEED_APPLIED_INVALID_FUNCTION, sourceLoc,
        func.getName());
org.apache.asterix.metadata.apiIMetadataManagergetFunction

Popular methods of IMetadataManager

  • abortTransaction
    Aborts a remote transaction running on the metadata node.
  • addDataset
    Inserts a new dataset into the metadata.
  • 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.
  • 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

  • Finding current android device location
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • 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