org.apache.flink.api.common.io.OutputFormat.close()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.apache.flink.api.common.io.OutputFormat.close()方法的一些代码示例,展示了OutputFormat.close()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputFormat.close()方法的具体详情如下:
包路径:org.apache.flink.api.common.io.OutputFormat
类名称:OutputFormat
方法名:close

OutputFormat.close介绍

[英]Method that marks the end of the life-cycle of parallel output instance. Should be used to close channels and streams and release resources. After this method returns without an error, the output is assumed to be correct.

When this method is called, the output format it guaranteed to be opened.
[中]方法,该方法标记并行输出实例生命周期的结束。应用于关闭渠道和流,并释放资源。在该方法返回且没有错误后,假定输出是正确的。
当调用此方法时,它保证打开的输出格式。

代码示例

代码示例来源:origin: apache/flink

@Override
public void close() throws IOException {
  try {
    format.close();
  } catch (Exception ex) {
    cleanup();
    throw ex;
  }
}

代码示例来源:origin: apache/flink

format.close();

代码示例来源:origin: org.gradoop/gradoop-flink

@Override
public void close() throws IOException {
 for (OutputFormat<IT> outputFormat : formatsPerSubdirectory.values()) {
  outputFormat.close();
 }
 formatsPerSubdirectory.clear();
}

代码示例来源:origin: dbs-leipzig/gradoop

@Override
public void close() throws IOException {
 for (OutputFormat<IT> outputFormat : formatsPerSubdirectory.values()) {
  outputFormat.close();
 }
 formatsPerSubdirectory.clear();
}

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.10

@Override
public void close() throws IOException {
  try {
    format.close();
  } catch (Exception ex) {
    cleanup();
    throw ex;
  }
}

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.11

@Override
public void close() throws IOException {
  try {
    format.close();
  } catch (Exception ex) {
    cleanup();
    throw ex;
  }
}

代码示例来源:origin: org.apache.flink/flink-streaming-java

@Override
public void close() throws IOException {
  try {
    format.close();
  } catch (Exception ex) {
    cleanup();
    throw ex;
  }
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

@Override
public void cancel() throws Exception {
  this.taskCanceled = true;
  OutputFormat<IT> format = this.format;
  if (format != null) {
    try {
      this.format.close();
    } catch (Throwable t) {}
    
    // make a best effort to clean up
    try {
      if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) {
        cleanupCalled = true;
        ((CleanupWhenUnsuccessful) format).tryCleanupOnError();
      }
    }
    catch (Throwable t) {
      LOG.error("Cleanup on error failed.", t);
    }
  }
  
  LOG.debug(getLogString("Cancelling data sink operator"));
}

代码示例来源:origin: org.apache.flink/flink-runtime

@Override
public void cancel() throws Exception {
  this.taskCanceled = true;
  OutputFormat<IT> format = this.format;
  if (format != null) {
    try {
      this.format.close();
    } catch (Throwable t) {}
    
    // make a best effort to clean up
    try {
      if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) {
        cleanupCalled = true;
        ((CleanupWhenUnsuccessful) format).tryCleanupOnError();
      }
    }
    catch (Throwable t) {
      LOG.error("Cleanup on error failed.", t);
    }
  }
  
  LOG.debug(getLogString("Cancelling data sink operator"));
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

@Override
public void cancel() throws Exception {
  this.taskCanceled = true;
  OutputFormat<IT> format = this.format;
  if (format != null) {
    try {
      this.format.close();
    } catch (Throwable t) {}
    // make a best effort to clean up
    try {
      if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) {
        cleanupCalled = true;
        ((CleanupWhenUnsuccessful) format).tryCleanupOnError();
      }
    }
    catch (Throwable t) {
      LOG.error("Cleanup on error failed.", t);
    }
  }
  LOG.debug(getLogString("Cancelling data sink operator"));
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

@Override
public void cancel() throws Exception {
  this.taskCanceled = true;
  OutputFormat<IT> format = this.format;
  if (format != null) {
    try {
      this.format.close();
    } catch (Throwable t) {}
    
    // make a best effort to clean up
    try {
      if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) {
        cleanupCalled = true;
        ((CleanupWhenUnsuccessful) format).tryCleanupOnError();
      }
    }
    catch (Throwable t) {
      LOG.error("Cleanup on error failed.", t);
    }
  }
  
  LOG.debug(getLogString("Cancelling data sink operator"));
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

this.format.close();
this.format = null;
  this.format.close();

代码示例来源:origin: com.alibaba.blink/flink-core

format.close();

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

this.format.close();
this.format = null;
  this.format.close();

代码示例来源:origin: org.apache.flink/flink-runtime

this.format.close();
this.format = null;
  this.format.close();

代码示例来源:origin: org.apache.flink/flink-core

format.close();

代码示例来源:origin: com.alibaba.blink/flink-runtime

this.format.close();
this.format = null;
  this.format.close();

相关文章