How to use the catalog/catalogUtils.setSilencedErrors function in catalog

To help you get started, we’ve selected a few catalog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalogEntry.js View on Github external
loadNavOptPopularityForChildren(options) {
    const self = this;

    options = catalogUtils.setSilencedErrors(options);

    if (!self.dataCatalog.canHaveNavOptMetadata()) {
      return $.Deferred()
        .reject()
        .promise();
    }
    if (self.navOptPopularityForChildrenPromise && (!options || !options.refreshCache)) {
      return catalogUtils.applyCancellable(self.navOptPopularityForChildrenPromise, options);
    }
    const deferred = $.Deferred();
    const cancellablePromises = [];
    if (self.definition && self.definition.navOptLoaded && (!options || !options.refreshCache)) {
      cancellablePromises.push(
        self
          .getChildren(options)
          .done(childEntries => {
github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalogEntry.js View on Github external
getNavOptMeta(options) {
    const self = this;

    options = catalogUtils.setSilencedErrors(options);

    if (!self.dataCatalog.canHaveNavOptMetadata() || !self.isTableOrView()) {
      return $.Deferred()
        .reject()
        .promise();
    }
    if (options && options.cachedOnly) {
      return (
        catalogUtils.applyCancellable(self.navOptMetaPromise, options) ||
        $.Deferred()
          .reject(false)
          .promise()
      );
    }
    if (options && options.refreshCache) {
      return catalogUtils.applyCancellable(reloadNavOptMeta(self, options), options);
github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalogEntry.js View on Github external
getNavigatorMeta(options) {
    const self = this;

    options = catalogUtils.setSilencedErrors(options);

    if (!self.canHaveNavigatorMetadata()) {
      return $.Deferred()
        .reject()
        .promise();
    }
    if (options && options.cachedOnly) {
      return (
        catalogUtils.applyCancellable(self.navigatorMetaPromise, options) ||
        $.Deferred()
          .reject(false)
          .promise()
      );
    }
    if (options && options.refreshCache) {
      return catalogUtils.applyCancellable(reloadNavigatorMeta(self, options), options);
github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalog.js View on Github external
loadNavOptPopularityForTables(options) {
    const self = this;
    const deferred = $.Deferred();
    const cancellablePromises = [];
    let popularEntries = [];
    const pathsToLoad = [];

    options = catalogUtils.setSilencedErrors(options);

    const existingPromises = [];
    options.paths.forEach(path => {
      const existingDeferred = $.Deferred();
      self
        .getEntry({ namespace: options.namespace, compute: options.compute, path: path })
        .done(tableEntry => {
          if (tableEntry.navOptPopularityForChildrenPromise) {
            tableEntry.navOptPopularityForChildrenPromise
              .done(existingPopularEntries => {
                popularEntries = popularEntries.concat(existingPopularEntries);
                existingDeferred.resolve();
              })
              .fail(existingDeferred.reject);
          } else if (tableEntry.definition && tableEntry.definition.navOptLoaded) {
            cancellablePromises.push(
github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalogEntry.js View on Github external
loadNavigatorMetaForChildren(options) {
    const self = this;

    options = catalogUtils.setSilencedErrors(options);

    if (!self.canHaveNavigatorMetadata() || self.isField()) {
      return $.Deferred()
        .reject()
        .promise();
    }

    if (self.navigatorMetaForChildrenPromise && (!options || !options.refreshCache)) {
      return catalogUtils.applyCancellable(self.navigatorMetaForChildrenPromise, options);
    }

    const deferred = $.Deferred();

    const cancellablePromises = [];

    cancellablePromises.push(