????:
????flink on yarn ??????flink????
????????hdfs????????????????,????ark1??hdfs??????active??????standby
ark2????????????standby????active
????:??flink??????????checkpoint??hdfs??url??hdfs:ark:8082
????????????????,????????????standby??????????????,????????
????????????hdfs??mycluster ????checkpoint????????????????
final String HADOOP_CONF_DIR = "/etc/hadoop/conf";
org.apache.hadoop.conf.Configuration configuration = new
org.apache.hadoop.conf.Configuration();
configuration.addResource(new Path(HADOOP_CONF_DIR + "/core-site.xml"));
configuration.addResource(new Path(HADOOP_CONF_DIR + "/hdfs-site.xml"));
env.setStateBackend(new FsStateBackend("hdfs://mycluster/flinkCheckpoint"));
//??????
??????????
Caused by: java.io.IOException: Cannot instantiate file system for URI:
hdfs://mycluster/flinkCheckpoint
at
org.apache.flink.runtime.fs.hdfs.HadoopFsFactory.create(HadoopFsFactory.java:196)
at
org.apache.flink.core.fs.FileSystem.getUnguardedFileSystem(FileSystem.java:527)
at org.apache.flink.core.fs.FileSystem.get(FileSystem.java:408)
at org.apache.flink.core.fs.Path.getFileSystem(Path.java:274)
at
org.apache.flink.runtime.state.filesystem.FsCheckpointStorage.<init>(FsCheckpointStorage.java:64)
at
org.apache.flink.runtime.state.filesystem.FsStateBackend.createCheckpointStorage(FsStateBackend.java:518)
at
org.apache.flink.runtime.checkpoint.CheckpointCoordinator.<init>(CheckpointCoordinator.java:321)
... 22 common frames omitted
Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException:
mycluster
at
org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:438)
at
org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:311)
at
org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:176)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:690)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:631)
at
org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:160)
at
org.apache.flink.runtime.fs.hdfs.HadoopFsFactory.create(HadoopFsFactory.java:168)
... 28 common frames omitted
Caused by: java.net.UnknownHostException: mycluster
... 35 common frames omitted
??