flink - lib - hiveexec

hive-exec-shaded
  • 此包是hive exec的shaded版本痕支,在flink環(huán)境訪問hive需要用到此包颁虐,兼容flink,排除掉了各類與flink沖突的依賴項卧须,在hive 3.1.2版本中使用正常另绩。
  • maven打包命令:mvn clean compile install -f pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>jolin</groupId>
    <artifactId>hive-exec-shaded</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <hive-version>3.1.2</hive-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <flink.version>1.12.2</flink.version>
        <java.version>1.8</java.version>
        <scala.binary.version>2.12</scala.binary.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-exec</artifactId>
            <version>${hive-version}</version>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <configuration>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <includes>
                                        <include>hive-exec-log4j2.properties</include>
                                        <include>hive-log4j2.properties</include>
                                        <include>package.jdo</include>
                                        <include>parquet-logging.properties</include>
                                        <include>parquet.thrift</include>
                                        <include>tez-container-log4j2.properties</include>

                                        <include>au/com/bytecode/opencsv/**</include>
                                        <include>com/**</include>
                                        <include>io/airlift/**</include>
                                        <include>javaewah/**</include>
                                        <include>javax/jdo/**</include>
                                        <include>javax/realtime/**</include>
                                        <include>META-INF/maven/**</include>
                                        <include>META-INF/org/**</include>
                                        <include>META-INF/services/**</include>
                                        <include>META-INF/ASL2.0</include>
                                        <include>META-INF/DEPENDENCIES</include>
                                        <include>META-INF/LICENSE</include>
                                        <include>META-INF/LICENSE.txt</include>
                                        <include>META-INF/MANIFEST.MF</include>
                                        <include>META-INF/NOTICE</include>
                                        <include>META-INF/NOTICE.txt</include>

                                        <include>org/json/**</include>
                                        <include>org/joda/**</include>
                                        <include>org/apache/avro/**</include>
                                        <include>org/apache/hive/**</include>
                                        <include>org/apache/orc/**</include>
                                        <include>org/apache/parquet/**</include>
                                        <include>org/apache/tez/**</include>
                                        <include>org/apache/thrift/**</include>
                                        <include>org/apache/commons/lang/**</include>
                                        <include>org/apache/commons/lang3/**</include>
                                        <include>org/apache/hadoop/mapred/**</include>
                                        <include>org/apache/hadoop/hive/**</include>
                                        <include>org/apache/hadoop/fs/DefaultFileAccess.class</include>
                                        <include>org/apache/hadoop/fs/ProxyFileSystem.class</include>
                                        <include>org/apache/hadoop/fs/ProxyLocalFileSystem$PFileChecksum.class</include>
                                        <include>org/apache/hadoop/fs/ProxyLocalFileSystem.class</include>
                                        <include>
                                            org/apache/hadoop/security/token/delegation/HiveDelegationTokenSupport.class
                                        </include>
                                        <include>
                                            org/apache/hadoop/security/token/delegation/MetastoreDelegationTokenSupport.class
                                        </include>
                                        <include>org/codehaus/jackson/**</include>

                                        <include>shaded/**</include>
                                        <include>javolution/**</include>
                                        <include>jodd/**</include>
                                    </includes>

                                </filter>
                            </filters>
                            <relocations>
                                <relocation>
                                    <pattern>com.google.common</pattern>
                                    <shadedPattern>com.cerence.shaded.common</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.google.protobuf</pattern>
                                    <shadedPattern>com.cerence.shaded.protobuf</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.google.thirdparty</pattern>
                                    <shadedPattern>com.cerence.shaded.thirdparty</shadedPattern>
                                </relocation>

                            </relocations>

                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市花嘶,隨后出現(xiàn)的幾起案子笋籽,更是在濱河造成了極大的恐慌,老刑警劉巖椭员,帶你破解...
    沈念sama閱讀 211,290評論 6 491
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件车海,死亡現(xiàn)場離奇詭異,居然都是意外死亡隘击,警方通過查閱死者的電腦和手機(jī)侍芝,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,107評論 2 385
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來埋同,“玉大人州叠,你說我怎么就攤上這事⌒琢蓿” “怎么了咧栗?”我有些...
    開封第一講書人閱讀 156,872評論 0 347
  • 文/不壞的土叔 我叫張陵逆甜,是天一觀的道長。 經(jīng)常有香客問我致板,道長交煞,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 56,415評論 1 283
  • 正文 為了忘掉前任斟或,我火速辦了婚禮素征,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘缕粹。我一直安慰自己稚茅,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,453評論 6 385
  • 文/花漫 我一把揭開白布平斩。 她就那樣靜靜地躺著亚享,像睡著了一般。 火紅的嫁衣襯著肌膚如雪绘面。 梳的紋絲不亂的頭發(fā)上欺税,一...
    開封第一講書人閱讀 49,784評論 1 290
  • 那天,我揣著相機(jī)與錄音揭璃,去河邊找鬼晚凿。 笑死,一個胖子當(dāng)著我的面吹牛瘦馍,可吹牛的內(nèi)容都是我干的歼秽。 我是一名探鬼主播,決...
    沈念sama閱讀 38,927評論 3 406
  • 文/蒼蘭香墨 我猛地睜開眼情组,長吁一口氣:“原來是場噩夢啊……” “哼燥筷!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起院崇,我...
    開封第一講書人閱讀 37,691評論 0 266
  • 序言:老撾萬榮一對情侶失蹤肆氓,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后底瓣,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體谢揪,經(jīng)...
    沈念sama閱讀 44,137評論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,472評論 2 326
  • 正文 我和宋清朗相戀三年捐凭,在試婚紗的時候發(fā)現(xiàn)自己被綠了拨扶。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,622評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡茁肠,死狀恐怖屈雄,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情官套,我是刑警寧澤,帶...
    沈念sama閱讀 34,289評論 4 329
  • 正文 年R本政府宣布,位于F島的核電站奶赔,受9級特大地震影響惋嚎,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜站刑,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,887評論 3 312
  • 文/蒙蒙 一另伍、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧绞旅,春花似錦摆尝、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,741評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至晃琳,卻和暖如春讯检,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背卫旱。 一陣腳步聲響...
    開封第一講書人閱讀 31,977評論 1 265
  • 我被黑心中介騙來泰國打工人灼, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人顾翼。 一個月前我還...
    沈念sama閱讀 46,316評論 2 360
  • 正文 我出身青樓投放,卻偏偏與公主長得像,于是被迫代替她去往敵國和親适贸。 傳聞我的和親對象是個殘疾皇子灸芳,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,490評論 2 348