Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
zackyoungh authored and github-actions[bot] committed Dec 12, 2024
1 parent ad29150 commit 13d74a4
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 28 deletions.
9 changes: 6 additions & 3 deletions dinky-admin/src/main/java/org/dinky/init/EnvInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
package org.dinky.init;

import org.apache.hadoop.fs.FileSystem;

import java.io.IOException;

import javax.annotation.PreDestroy;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.ApplicationContext;
Expand All @@ -31,9 +36,6 @@
import cn.hutool.system.SystemUtil;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.PreDestroy;
import java.io.IOException;

@Order(-1)
@Component
@Slf4j
Expand Down Expand Up @@ -65,6 +67,7 @@ public void run(ApplicationArguments args) throws Exception {
ipAddress,
port);
}

@PreDestroy
private void destroy() throws IOException {
FileSystem.closeAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,9 @@ localizedKeytabPath, new Path(keytab), "", LocalResourceType.FILE, false, false)
}

amContainer.setLocalResources(fileUploader.getRegisteredLocalResources());
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fileUploader.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the
// filesystem, causing an exception to the concurrent commit
// fileUploader.close();

// Setup CLASSPATH and environment variables for ApplicationMaster
final Map<String, String> appMasterEnv = new HashMap<>();
Expand Down Expand Up @@ -1495,8 +1496,9 @@ public void run() {
throw new IOException("Deleting files in " + yarnFilesDir + " was unsuccessful");
}

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fs.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// fs.close();
} catch (IOException e) {
LOG.error("Failed to delete Flink Jar and configuration files in HDFS", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,9 @@ localizedKeytabPath, new Path(keytab), "", LocalResourceType.FILE, false, false)
}

amContainer.setLocalResources(fileUploader.getRegisteredLocalResources());
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fileUploader.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the
// filesystem, causing an exception to the concurrent commit
// fileUploader.close();

// Setup CLASSPATH and environment variables for ApplicationMaster
final Map<String, String> appMasterEnv = new HashMap<>();
Expand Down Expand Up @@ -1546,8 +1547,9 @@ public void run() {
throw new IOException("Deleting files in " + yarnFilesDir + " was unsuccessful");
}

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fs.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// fs.close();
} catch (IOException e) {
LOG.error("Failed to delete Flink Jar and configuration files in HDFS", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1054,8 +1054,9 @@ localizedKeytabPath, new Path(keytab), "", LocalResourceType.FILE, false, false)
}

amContainer.setLocalResources(fileUploader.getRegisteredLocalResources());
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fileUploader.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the
// filesystem, causing an exception to the concurrent commit
// fileUploader.close();

// Setup CLASSPATH and environment variables for ApplicationMaster
final Map<String, String> appMasterEnv = generateApplicationMasterEnv(
Expand Down Expand Up @@ -1551,8 +1552,9 @@ public void run() {
throw new IOException("Deleting files in " + yarnFilesDir + " was unsuccessful");
}

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fs.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// fs.close();
} catch (IOException e) {
LOG.error("Failed to delete Flink Jar and configuration files in HDFS", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,9 @@ localizedKeytabPath, new Path(keytab), "", LocalResourceType.FILE, false, false)
}

amContainer.setLocalResources(fileUploader.getRegisteredLocalResources());
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fileUploader.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the
// filesystem, causing an exception to the concurrent commit
// fileUploader.close();

// Setup CLASSPATH and environment variables for ApplicationMaster
final Map<String, String> appMasterEnv = generateApplicationMasterEnv(
Expand Down Expand Up @@ -1567,8 +1568,9 @@ public void run() {
throw new IOException("Deleting files in " + yarnFilesDir + " was unsuccessful");
}

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fs.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// fs.close();
} catch (IOException e) {
LOG.error("Failed to delete Flink Jar and configuration files in HDFS", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,9 @@ localizedKeytabPath, new Path(keytab), "", LocalResourceType.FILE, false, false)

amContainer.setLocalResources(fileUploader.getRegisteredLocalResources());

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
//fileUploader.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the
// filesystem, causing an exception to the concurrent commit
// fileUploader.close();

Utils.setAclsFor(amContainer, flinkConfiguration);

Expand Down Expand Up @@ -1578,7 +1579,8 @@ public void run() {
throw new IOException("Deleting files in " + yarnFilesDir + " was unsuccessful");
}

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// fs.close();
} catch (IOException e) {
LOG.error("Failed to delete Flink Jar and configuration files in HDFS", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,8 @@ localizedKeytabPath, new Path(keytab), "", LocalResourceType.FILE, false, false)
}

amContainer.setLocalResources(fileUploader.getRegisteredLocalResources());
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the
// filesystem, causing an exception to the concurrent commit
// fileUploader.close();

Utils.setAclsFor(amContainer, flinkConfiguration);
Expand Down Expand Up @@ -1614,7 +1615,8 @@ public void run() {
throw new IOException("Deleting files in " + yarnFilesDir + " was unsuccessful");
}

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// fs.close();
} catch (IOException e) {
LOG.error("Failed to delete Flink Jar and configuration files in HDFS", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,8 @@ localizedKeytabPath, new Path(keytab), "", LocalResourceType.FILE, false, false)
}

amContainer.setLocalResources(fileUploader.getRegisteredLocalResources());
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the
// filesystem, causing an exception to the concurrent commit
// fileUploader.close();

Utils.setAclsFor(amContainer, flinkConfiguration);
Expand Down Expand Up @@ -1613,9 +1614,11 @@ public void run() {
throw new IOException("Deleting files in " + yarnFilesDir + " was unsuccessful");
}

// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes the filesystem, causing an exception to the concurrent commit
// fs.close();
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// overwrite zh:这里必需需要剔除close,因为它会关闭filesystem,导致并发提交出现异常 en: Close must be culled here, as it closes
// the filesystem, causing an exception to the concurrent commit
// fs.close();
} catch (IOException e) {
LOG.error("Failed to delete Flink Jar and configuration files in HDFS", e);
}
Expand Down

0 comments on commit 13d74a4

Please sign in to comment.