hequn8128 commented on a change in pull request #10061: [FLINK-14581][python] 
Let python UDF execution no longer rely on the flink directory structure to 
support running python UDFs on yarn.
URL: https://github.com/apache/flink/pull/10061#discussion_r347214444
 
 

 ##########
 File path: 
flink-python/src/main/java/org/apache/flink/client/python/PythonResourceExtractor.java
 ##########
 @@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.client.python;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static 
org.apache.flink.python.util.ResourceUtil.extractBasicDependenciesFromResource;
+
+/**
+ * The program that extracts the internal python libraries and
+ * join their absolute paths to append to PYTHONPATH. it can
+ * accept one argument as the temp directory.
+ */
+public class PythonResourceExtractor {
+
+       public static void main(String[] args) throws IOException {
+               String tmpdir = System.getProperty("java.io.tmpdir");
+
+               List<File> files = extractBasicDependenciesFromResource(tmpdir,
 
 Review comment:
   Pay attention to the format.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to