Hey all - troubleshooting some issues with the ope...
# troubleshooting
r
Hey all - troubleshooting some issues with the operator and could use some guidance, specifically as it pertains to reading/writing checkpoints and savepoints stored in GCS. Reading through the docs, I attempted to use the
ENABLE_BUILT_IN_PLUGINS
configuration for the podTemplate to bring in Hadoop which I believe would be all that I needed:
Copy code
podTemplate:
  spec:
    containers:
      - env:
        - name: ENABLE_BUILT_IN_PLUGINS
          value: flink-s3-fs-hadoop-1.15.4.jar
with the appropriate gs bucket configuration:
Copy code
spec:
  flinkConfiguration:
    state.checkpoints.dir: gs://.../flink-jobs/my-job/checkpoints
    state.savepoints.dir: gs://.../flink-jobs/my-job/savepoints
I’m targeting the
flink:1.15
image as well as
v1_15
for the version as well. But I still am getting errors in the logs about the ’gs` scheme not being recognized. Is there another or better way to handle this?
g
I think the s3 plugin is for writing s3://… files
r
🤦
g
gs:// will not be recognized by the plugin so it won’t be used
😅
r
Okay, I’m guessing the same configuration still applies (sans swapping s3-fs to gs-fs). As far as the crendentials goes - do those need to be put on just the job manager container or task manager as well?
g
Both so put it in the common top level pod template
r
Okay, so just this guy:
Copy code
spec:
  podTemplate:
    apiVersion: v1
    kind: Pod
    metadata:
      name: pod-template
    spec:
      containers:
        - name: flink-main-container
          volumeMounts:
            - mountPath: /opt/flink/jars
              name: jars
            - mountPath: /flink/gcs-creds/
              name: gcs-creds
          env:
          - name: GOOGLE_APPLICATION_CREDENTIALS
            value: /flink/gcs-creds/key.json
          - name: ENABLE_BUILT_IN_PLUGINS
            value: flink-gs-fs-hadoop-1.15.4.jar
      volumes:
        - name: jars
          emptyDir: { }
        - name: gcs-creds
          emptyDir: { }
g
Something like that :)
r
So it looks like it’s complaining about Hadoop now:
Copy code
org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.util.Shell [] - Failed to detect a valid hadoop home directory                                                                    
java.io.FileNotFoundException: HADOOP_HOME and hadoop.home.dir are unset.