1996fanrui commented on code in PR #1858:
URL: 
https://github.com/apache/incubator-streampark/pull/1858#discussion_r998320542


##########
streampark-console/streampark-console-service/src/main/resources/flink-application.conf:
##########
@@ -15,60 +15,61 @@
 # limitations under the License.
 #
 
-flink:
-  deployment:
-    property: #@see: 
https://ci.apache.org/projects/flink/flink-docs-release-1.12/deployment/config.html
-      $internal.application.main:
-      pipeline.name:
-      yarn.application.queue:
-      taskmanager.numberOfTaskSlots: 1
-      parallelism.default: 2
-      jobmanager.memory:
-        flink.size:
-        heap.size:
-        jvm-metaspace.size:
-        jvm-overhead.max:
-        off-heap.size:
-        process.size:
-      taskmanager.memory:
-        flink.size:
-        framework.heap.size:
-        framework.off-heap.size:
-        managed.size:
-        process.size:
-        task.heap.size:
-        task.off-heap.size:
-        jvm-metaspace.size:
-        jvm-overhead.max:
-        jvm-overhead.min:
-        managed.fraction: 0.4
-      pipeline:
-        auto-watermark-interval: 200ms
-      # checkpoint
-      execution:
-        checkpointing:
-          mode: EXACTLY_ONCE
-          interval: 30s
-          timeout: 10min
-          unaligned: false
-          externalized-checkpoint-retention: RETAIN_ON_CANCELLATION
-      # state backend
-      state:
-        backend: hashmap # Special note: flink1.12 optional configuration 
('jobmanager', 'filesystem', 'rocksdb'), flink1.12+ optional configuration 
('hashmap', 'rocksdb'),
-        backend.incremental: true
-        checkpoint-storage: filesystem
-        savepoints.dir: file:///tmp/chkdir
-        checkpoints.dir: file:///tmp/chkdir
-      # restart strategy
-      restart-strategy: fixed-delay  # Restart strategy 
[(fixed-delay|failure-rate|none) a total of 3 configurable strategies]
-      restart-strategy.fixed-delay:
-        attempts: 3
-        delay: 5000
-      restart-strategy.failure-rate:
-        max-failures-per-interval:
-        failure-rate-interval:
-        delay:
-  # table
-  table:
-    planner: blink # (blink|old|any)
-    mode: streaming #(batch|streaming)

Review Comment:
   Hi @wolfboys , thanks for your contribution.
   
   Why delete table related configs?



##########
streampark-common/src/main/scala/org/apache/streampark/common/util/FileUtils.scala:
##########
@@ -23,6 +23,104 @@ import scala.collection.JavaConversions._
 
 object FileUtils extends org.apache.commons.io.FileUtils {
 
+  lazy val fileTypes: Map[String, String] = {
+    val maps = new util.HashMap[String, String]()
+    maps.put("FFD8FF", "jpg")
+    maps.put("89504E47", "png")
+    maps.put("47494638", "gif")
+    maps.put("49492A00227105008037", "tif")
+    maps.put("424D228C010000000000", "bmp")
+    maps.put("424D8240090000000000", "bmp")
+    maps.put("424D8E1B030000000000", "bmp")
+    maps.put("41433130313500000000", "dwg")
+
+    maps.put("68746D6C3E", "html")
+    maps.put("48544D4C207B0D0A0942", "css")
+    maps.put("696B2E71623D696B2E71", "js")
+    maps.put("7B5C727466315C616E73", "rtf")
+
+    maps.put("38425053000100000000", "psd")
+    maps.put("44656C69766572792D646174653A", "eml")
+    maps.put("D0CF11E0A1B11AE10000", "doc")
+
+
+    maps.put("D0CF11E0A1B11AE10000", "vsd")
+    maps.put("5374616E64617264204A", "mdb")
+    maps.put("252150532D41646F6265", "ps")
+    maps.put("255044462D312E", "pdf")
+    maps.put("75736167", "txt")
+
+    maps.put("2E524D46000000120001", "rmvb")
+    maps.put("464C5601050000000900", "flv")
+    maps.put("00000020667479706D70", "mp4")
+    maps.put("49443303000000002176", "mp3")
+    maps.put("000001B", "mpg")
+    maps.put("3026B2758E66CF11A6D9", "wmv")
+    maps.put("57415645", "wav")
+    maps.put("41564920", "avi")
+
+    maps.put("4D546864", "mid")
+    maps.put("504B0304", "zip")
+    maps.put("52617221", "rar")
+    maps.put("235468697320636F6E66", "ini")
+    maps.put("504B03040A000000", "jar")
+    maps.put("4D5A9000030000000400", "exe")
+
+    maps.put("3C25402070616765206C", "jsp")
+    maps.put("4D616E69666573742D56", "mf")
+    maps.put("3C3F786D6C", "xml")
+    maps.put("494E5345525420494E54", "sql")
+    maps.put("7061636B616765207765", "java")
+    maps.put("406563686F206F66660D", "bat")
+    maps.put("1F8B0800000000000000", "gz")
+    maps.put("6C6F67346A2E726F6F74", "properties")
+    maps.put("CAFEBABE0000002E0041", "class")
+    maps.put("49545346030000006000", "chm")
+    maps.put("04000000010000001300", "mxp")
+    maps.put("504B0304140006000800", "docx")
+    maps.put("D0CF11E0A1B11AE10000", "wps")
+    maps.put("6431303A637265617465", "torrent")
+
+    maps.put("6D6F6F76", "mov")
+    maps.put("FF575043", "wpd")
+    maps.put("CFAD12FEC5FD746F", "dbx")
+    maps.put("2142444E", "pst")
+    maps.put("AC9EBD8F", "qdf")
+    maps.put("E3828596", "pwl")
+    maps.put("2E7261FD", "ram")
+    maps.put("2E524D46", "rm")
+    maps.toMap
+  }
+
+  private[this] def bytesToHexString(src: Array[Byte]): String = {
+    val stringBuilder: StringBuilder = new StringBuilder
+    if (src == null || src.length <= 0) return null
+    for (i <- 0 until src.length) {
+      val v: Int = src(i) & 0xFF
+      val hv: String = Integer.toHexString(v).toUpperCase
+      if (hv.length < 2) {
+        stringBuilder.append(0)
+      }
+      stringBuilder.append(hv)
+    }
+    stringBuilder.toString
+  }
+
+  def getFileType(file: File): String = {

Review Comment:
   Why change this file? I didn't see anywhere call this method.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to