Joe 9 months ago
parent
commit
743347c9af

+ 7 - 0
.idea/codeStyles/Project.xml

@@ -0,0 +1,7 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <ScalaCodeStyleSettings>
+      <option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
+    </ScalaCodeStyleSettings>
+  </code_scheme>
+</component>

+ 5 - 0
.idea/codeStyles/codeStyleConfig.xml

@@ -0,0 +1,5 @@
+<component name="ProjectCodeStyleConfiguration">
+  <state>
+    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
+  </state>
+</component>

+ 18 - 0
.idea/compiler.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="spark-examples" />
+      </profile>
+    </annotationProcessing>
+  </component>
+  <component name="JavacSettings">
+    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
+      <module name="spark-examples" options="-parameters" />
+    </option>
+  </component>
+</project>

+ 6 - 0
.idea/encodings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+  </component>
+</project>

+ 40 - 0
.idea/jarRepositories.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="https://repo.maven.apache.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="public" />
+      <option name="name" value="Public Repositories" />
+      <option name="url" value="http://nexus.stuuudy.com:9580/nexus/content/groups/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="maven-net-cloudera" />
+      <option name="name" value="cloudera Mirror" />
+      <option name="url" value="https://repository.cloudera.com/content/repositories/releases/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="stuuudy" />
+      <option name="name" value="stuuudy" />
+      <option name="url" value="http://nexus.stuuudy.com:9580/nexus/content/repositories/stuuudy/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="releases" />
+      <option name="name" value="Releases" />
+      <option name="url" value="http://nexus.stuuudy.com:9580/nexus/content/repositories/releases/" />
+    </remote-repository>
+  </component>
+</project>

+ 10 - 1
.idea/misc.xml

@@ -3,5 +3,14 @@
   <component name="Black">
     <option name="sdkName" value="Python 3.12" />
   </component>
-  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+    <option name="workspaceImportForciblyTurnedOn" value="true" />
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_21" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
 </project>

+ 1 - 1
.idea/modules.xml

@@ -2,7 +2,7 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/recommend-emr-dataprocess.iml" filepath="$PROJECT_DIR$/.idea/recommend-emr-dataprocess.iml" />
+      <module fileurl="file://$PROJECT_DIR$/spark-examples.iml" filepath="$PROJECT_DIR$/spark-examples.iml" />
     </modules>
   </component>
 </project>

+ 6 - 0
.idea/scala_compiler.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ScalaCompilerConfiguration">
+    <profile name="Maven 1" modules="spark-examples" />
+  </component>
+</project>

+ 15 - 15
qiaojialiang/checkHiveDataUtil.py

@@ -41,22 +41,22 @@ def check_data(project, table, partitionDt, partitionDtHh) -> int:
         t = odps.get_table(name=table)
         # check_res = t.exist_partition(partition_spec=f'dt={partition}')
         # 含有hh分区
-        if not {partitionDtHh}:
-            check_res = t.exist_partition(partition_spec=f'dt={partitionDt},hh={partitionDtHh}')
-            if check_res:
-                sql = f'select * from {project}.{table} where dt = {partitionDt} and hh={partitionDtHh}'
-                with odps.execute_sql(sql=sql).open_reader() as reader:
-                    data_count = reader.count
-            else:
-                data_count = 0
+        # if not {partitionDtHh}:
+        check_res = t.exist_partition(partition_spec=f'dt={partitionDt},hh={partitionDtHh}')
+        if check_res:
+            sql = f'select * from {project}.{table} where dt = {partitionDt} and hh={partitionDtHh}'
+            with odps.execute_sql(sql=sql).open_reader() as reader:
+                data_count = reader.count
         else:
-            check_res = t.exist_partition(partition_spec=f'dt={partitionDt}')
-            if check_res:
-                sql = f'select * from {project}.{table} where dt = {partitionDt}'
-                with odps.execute_sql(sql=sql).open_reader() as reader:
-                    data_count = reader.count
-            else:
-                data_count = 0
+            data_count = 0
+        # else:
+        #     check_res = t.exist_partition(partition_spec=f'dt={partitionDt}')
+        #     if check_res:
+        #         sql = f'select * from {project}.{table} where dt = {partitionDt}'
+        #         with odps.execute_sql(sql=sql).open_reader() as reader:
+        #             data_count = reader.count
+        #     else:
+        #         data_count = 0
     except Exception as e:
         print("error:" + str(e))
         data_count = 0

+ 13 - 0
spark-examples.iml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4">
+  <component name="AdditionalModuleElements">
+    <content url="file://$MODULE_DIR$" dumb="true">
+      <excludeFolder url="file://$MODULE_DIR$/venv" />
+    </content>
+  </component>
+  <component name="FacetManager">
+    <facet type="Python" name="Python">
+      <configuration sdkName="Python 3.12 (recommend-emr-dataprocess)" />
+    </facet>
+  </component>
+</module>