Close #127: [HIVEMALL-2] Change Maven release scheme for ASF release
Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/131eb060 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/131eb060 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/131eb060 Branch: refs/heads/master Commit: 131eb060a73817c8ac7aa0ea8ce03f3d0ab1bc12 Parents: 2da3f38 Author: Makoto Yui <[email protected]> Authored: Tue Dec 26 14:25:38 2017 +0900 Committer: Makoto Yui <[email protected]> Committed: Tue Dec 26 14:25:38 2017 +0900 ---------------------------------------------------------------------- .gitignore | 2 + .rat-excludes | 29 ++ .travis.yml | 2 +- KEYS | 73 +++++ bin/set_version.sh | 82 ++++++ conf/mixserv_env.sh | 18 ++ core/pom.xml | 2 +- .../main/java/hivemall/HivemallConstants.java | 1 - core/src/main/resources/log4j.properties | 17 ++ core/src/test/resources/log4j.properties | 17 ++ docs/gitbook/book.json | 2 +- docs/gitbook/misc/tokenizer.md | 2 +- mixserv/pom.xml | 6 +- mixserv/src/test/resources/log4j.properties | 17 ++ nlp/pom.xml | 6 +- nlp/src/test/resources/log4j.properties | 17 ++ pom.xml | 267 +++++++++---------- resources/ddl/import-packages.spark | 19 ++ resources/docker/Dockerfile | 19 ++ resources/docker/docker-compose.yml | 19 ++ resources/docker/etc/hadoop/core-site.xml | 18 ++ resources/docker/etc/hadoop/hdfs-site.xml | 18 ++ resources/docker/etc/hadoop/mapred-site.xml | 18 ++ resources/docker/etc/hadoop/yarn-site.xml | 18 ++ resources/docker/home/bin/init.sh | 18 ++ resources/docker/home/bin/prepare_iris.sh | 18 ++ resources/examples/kddtrack2/kddconv.awk | 20 ++ resources/examples/kddtrack2/scoreKDD.py | 206 -------------- resources/examples/movielens/generate_cv.sh | 18 ++ resources/header-definition.xml | 18 ++ resources/hivemall-checkstyle.xml | 18 ++ resources/misc/conv.awk | 19 ++ resources/misc/conv_pig.awk | 19 ++ resources/misc/emr_hivemall_bootstrap.sh | 18 ++ resources/misc/one-vs-rest.awk | 19 ++ spark/spark-2.0/pom.xml | 16 +- .../src/main/resources/log4j.properties | 17 ++ .../src/test/resources/data/files/README.md | 19 ++ .../src/test/resources/log4j.properties | 17 ++ spark/spark-2.1/pom.xml | 16 +- .../src/main/resources/log4j.properties | 17 ++ .../src/test/resources/data/files/README.md | 19 ++ .../src/test/resources/log4j.properties | 17 ++ spark/spark-2.2/extra-src/README.md | 19 ++ spark/spark-2.2/pom.xml | 16 +- .../src/main/resources/log4j.properties | 17 ++ .../src/test/resources/data/files/README.md | 19 ++ .../src/test/resources/log4j.properties | 17 ++ spark/spark-common/pom.xml | 4 +- ...isticRegressionDataGeneratorUDTFWrapper.java | 8 +- .../hivemall/ftvec/SortByFeatureUDFWrapper.java | 2 - src/site/markdown/contributing.md | 2 +- src/site/markdown/download.md | 21 +- src/site/markdown/release-guide.md | 65 +++++ src/site/markdown/release-setup.md | 174 ++++++++++++ src/site/site.xml | 34 +-- src/site/xdoc/index.xml.vm | 2 +- xgboost/pom.xml | 6 +- 58 files changed, 1213 insertions(+), 411 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 3b44c62..f9c3930 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ spark/bin/zinc-* .project metastore_db .java-version +*.bak +release.properties http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/.rat-excludes ---------------------------------------------------------------------- diff --git a/.rat-excludes b/.rat-excludes new file mode 100644 index 0000000..fb6ce1c --- /dev/null +++ b/.rat-excludes @@ -0,0 +1,29 @@ +# Dotfiles +.*/** +**/.* +**/.*/** + +**/*.txt +**/*.csv +**/*.tsv +**/*.css +**/*.svg +**/*.avro +**/*.seq +**/*.json + +# eclipse +**/*.prefs + +VERSION +**/target/** +**/META-INF/** + +# hivemall specific entries +conf/MIXSERV_LIST +resources/eclipse-style.xml +**/*.hive +**/*.spark +**/*.hql +docs/gitbook/_book/** +docs/gitbook/node_modules/** \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index ac6092c..950a5ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ branches: - develop before_install: - - mvn validate -Pxgboost + - mvn validate -Pcompile-xgboost notifications: email: false http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/KEYS ---------------------------------------------------------------------- diff --git a/KEYS b/KEYS new file mode 100644 index 0000000..c3e5927 --- /dev/null +++ b/KEYS @@ -0,0 +1,73 @@ +This file contains the PGP keys of various developers. +Please don't use them for email unless you have to. Their main purpose is code signing. + +Users: + pgp < KEYS + gpg --import KEYS + +Developers: + pgp -kxa <your name> # and append to KEYS (this file) + (pgpk -ll <your name> && pgpk -xa <your name>) >> KEYS + (gpg --list-sigs <your name> && gpg --armor --export <your name>) >> KEYS + +---- +pub rsa4096 2017-11-01 [SC] + 7A6BA1A10CC6ABF47159152193F4D08DC8CE801B +uid [ultimate] Makoto Yui (CODE SIGNING KEY) <[email protected]> +sig 3 93F4D08DC8CE801B 2017-11-01 Makoto Yui (CODE SIGNING KEY) <[email protected]> +sub rsa4096 2017-11-01 [E] +sig 93F4D08DC8CE801B 2017-11-01 Makoto Yui (CODE SIGNING KEY) <[email protected]> + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFn5ekEBEADOXvJr0Xshsus+AFEEaKJqw/4Vr+aHsn8a+QjMyQYtWrEt6mOD +ekwzIOLYC4LNNuxge8umLuZqnJrEtwwIlB5eBTjD+TVoAfqSW6oEq0hnCIb9Oecu +hHwsrpW+vfX7LPLT7wYlDZqnL+Fd9oCYnWlnlnKxJL/DIGRJu6+L9yUPAH0Oq1YG +d1oE5OmhrbZG2lrva3Ch81cFQ1FDSSpB1qwbT7g0zDcbfsoxBqz1kA+jdEb5KOmO +Tzme1MPlaVjGusWUovy41LvfKQJRVeeLaDvzo/yuNicnePHH/wIIv9lABPL7yzEW +ji7obKQVkqs/kAWVdCcG6g8fStlg40ysoMEgEM2BqI+cggU6qtDkojoM0qP++3NP +cInvLOMeDRcTTwGBKnpwbN1ihFMT1Iqd2l7/MPFO5FndjEBu3Un1RCMshfHLwBUX +AN1NWfLyTo6/cOCC61hgPdMFVb9x9lDta6bWLjikfqU4q4WqS/k6oCKOt70o7THt +Al2Z3wl4Cmp+43Dc7tL1GcubCZCk4tWtHp+d1uXSfcUuqgY+k0vD37f4Jpce8ZHU +V0pRjpKcbecoEXh+JSrxnzGIORBHXIKUHutqZ8AOCZ5fPsF8hH/DmIdjOkvSdaTd +WPBhXGGC48VyvOy+w8kUe+Klzi2jVihwyw3yFj/CtZ+nnkWz5YGBoN6arQARAQAB +tC9NYWtvdG8gWXVpIChDT0RFIFNJR05JTkcgS0VZKSA8bXl1aUBhcGFjaGUub3Jn +PokCTgQTAQgAOBYhBHproaEMxqv0cVkVIZP00I3IzoAbBQJZ+XpBAhsDBQsJCAcC +BhUICQoLAgQWAgMBAh4BAheAAAoJEJP00I3IzoAb2wcP/31wimuhXobMRhGkaXO7 +rOZoxKkdM2ocU7HDn9tCPvIGrUTkzb5AP//l8To8Rz3afDdqUX+lpCsVfHJP7h6l +iD/7JPfjeAPIgHgc98eYxvCpQzaEjRIzemfCLyVKc7mG6YrTSTNNDuwAYXcHF5jN +wa04UpwRzL956hQyWhg+J46P9fII12100JX1Bus5j3VP5coBuwE+bnK+ZQW4wi5T +UYAkhE7yrFjUUw9Ck0DPbaxl1+OvgQ3kkzmw2z1MqW3bzh16Sim2lUyIZN8LZVla +WKnO5Qaj5Z9RPdbnYNBb2ZfnWePCtPopOMtpKNPexVDQc/xlZ9mnOQl7d1eRIkxB +KTJpCSj2z1ZQSft2Z998BMFgIWqqn8QTGfLQRm1cutSdrs5sGeG3iQx7Gdvsi7E6 +EXHWdVD6mNL5ZIM4JtzK1nfnTDco0jjqEWc1DYoYnKxRPLbnhD7VtqkY5bcH58bv +4SnstaCM5UJGCVzQ//r/psKZmA8iAWRW9lYZVw/BL61tDc3uztG7Ysb/360KNkd6 +gtOchOVtto4Q9aaEbVpmEiy5S/tO9iiqNkDxYb2yElT6b6DkoKqApYkMmOb5Zt4u +p7Uvzno6ip+FSdQF20egOtxkRhMcR7uBNN3pPUnYejguXws+pJOljmEceepG5/kl ++38oIbYmjFSP6wAkd6JNeN8nuQINBFn5ekEBEADesvcr1WUjwdo1ZXrtyzdJRgNH +/cH/+Kh0wQPIA/Pf9d8orRHXYukYYlXkr7d6kG0Wd36rQuZeYFQVaqqdQUbLwdhw +iFqjX5n7mwd0hV7HjVK9i4BwtK7jD47OqAPoK+hL+M/k37u025WC9DbOrgasyrv0 +PbkW6bbBsDOsrVuuiw2D2amaLGXC6LRxFIah30KQpyv2n37eGT7t1t94SnjmiIVq +aJIpYhsEokNaVcj4gUE7t8o6++j/b1pMHuy1Hnfp3xf14Kh60246jvTd9zh4TVJd +Gnu9vYionAhdcxmPbM0CWpS0WVkCIlAFrVQzWpbjwFLfnr5W634MMjSHDEvBbQux +ET/nBFMUqA5Z4219lcucog9hAQeVx3TlpkCqbMDLk1ZgYlG9JCkdn5l/eoCduop2 +3UJDfDKgi6daOptT9t90jfGPtb9ZQZ3BlDJqpiiqXSS+Hn10MCZ6y0coRoKSh5XD +6zntwdpJkV9x0C+7S8/K7tuvXO/M3QGneWSqAA7fCClpxXyzg1BYV0LCA/ejPYe4 +9rDCmhRUG/Fpvc1JnSczZJTUN09m92wBG/n+hZ08MpAiVu0an231qDJATQwJ/15u +q5dOo/Ohe5hkoVvCaAV5GQFTqh1MUzR5HorRh15sUXpt4ZBNiucNS3vRq5RDr8WE +PVAj25/zNgVI5QmLqQARAQABiQI2BBgBCAAgFiEEemuhoQzGq/RxWRUhk/TQjcjO +gBsFAln5ekECGwwACgkQk/TQjcjOgBuBIg//cK3R4haXLae5H/yIiNVB2tUTqtwD +Mx2F/LQHdeolum22JHib69jhcfHIZJioUJW3l9t+q60MZgOpYfKGQRLUzp3GYk6R +A1J7TD3KEDlQr1XeEEJY7OZRSq8997+XhnVokg5z2zlPjI4EAwgUTASi0DuLttKy +4iSoHzH3+Sq1nbFcIQ/pzwlD3BrE+rqjU9zkDdgvTue7WfVasLdymxA8ds+57biU +34SPOOzazV2OVX+t+kwohqdeTLLIAycvbF8QtcENfXJNnqUrD1B4CXvct69ldQee +zrNu5CuAAwpJ0NGJvT00vS7Zz3wmpfIOOMZEvYZ0U6mWds318L/uvsMs03Ru4FEP +PPJIJSf4Cb+YCSZY9maKJ3YxQim82Gv5G6F3pwhaX42IqtMZ30yBFlOEmQp+5u6N +ZTENzVxrznQWq50WOP7FKEOTMhdolldXa6A4Fy61Z7dROXut/2iZ8J7lNsg9V1+r +CxRczlFCoxJ9E1+YY5xrdANxlBx/ukqk5CdElrUjZH7Wmnn5CBOw6B/z1ExcPjFP +tWQ6/C2pTmUPveQUKCBbTYTC45mWfysEkDtQnBnn+W5uQRagiAQOMfdPih5pg6j3 +4MpergMLYWtU95ylfAKDiQqXfs9IXZj+k6E2E6R4pkJEUGXI0tPWZiYOSb7/foJo +njFvxzTmNvLEvRA= +=hdfh +-----END PGP PUBLIC KEY BLOCK----- + http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/bin/set_version.sh ---------------------------------------------------------------------- diff --git a/bin/set_version.sh b/bin/set_version.sh new file mode 100755 index 0000000..00811eb --- /dev/null +++ b/bin/set_version.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# +# 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. +# + +if [ "$HIVEMALL_HOME" = "" ]; then + if [ -e ../bin/${0##*/} ]; then + HIVEMALL_HOME=".." + elif [ -e ./bin/${0##*/} ]; then + HIVEMALL_HOME="." + else + echo "env HIVEMALL_HOME not defined" + exit 1 + fi +fi + +cd $HIVEMALL_HOME + +function yes_or_no() { + while true; do + echo "Type [Y/N]" + echo -n ">>" + read answer + + case $answer in + [yY]) + return 0 + ;; + [nN]) + return 1 + ;; + esac + done +} + +old_version=`cat VERSION` +echo "Current version number is ${old_version}" +echo + +echo "This script will update the version string of Hivemall." +echo +echo "Please input a version string (e.g., 0.4.3-rc.2)" +echo -n ">>" +read new_version + +echo +echo "--------------------------------------------------------------------------" +echo "[Here are the list of files to update]" +echo +find . -type f \( -name 'VERSION' -o -name 'pom.xml' -o -name 'HivemallConstants.java' -o -name 'HivemallOpsSuite.scala' -o -name 'HiveUdfSuite.scala' \) | xargs grep ${old_version} +echo "--------------------------------------------------------------------------" +echo + +echo "Do you really want to update Hivemall version string from ${old_version} to ${new_version}?" +echo + +yes_or_no + +if [ "$?" -eq 1 ]; then + echo "aborted!" + exit 1 +fi +echo + +echo -n "Updating ..." +find . -type f \( -name 'VERSION' -o -name 'pom.xml' -o -name 'HivemallConstants.java' -o -name 'HivemallOpsSuite.scala' -o -name 'HiveUdfSuite.scala' \) | xargs sed -i '' -e "s/${old_version}/${new_version}/g" +echo "Done!" http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/conf/mixserv_env.sh ---------------------------------------------------------------------- diff --git a/conf/mixserv_env.sh b/conf/mixserv_env.sh index d9b6e52..32f6934 100644 --- a/conf/mixserv_env.sh +++ b/conf/mixserv_env.sh @@ -1,4 +1,22 @@ #!/bin/sh +# +# 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. +# MIXSERV_JMXOPTS+="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false" MIXSERV_VMOPTS+="-Xmx4g -da -server -XX:+PrintGCDetails -XX:+UseNUMA -XX:+UseParallelGC" http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/core/pom.xml ---------------------------------------------------------------------- diff --git a/core/pom.xml b/core/pom.xml index 0a6b0dc..ae04996 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> <relativePath>../pom.xml</relativePath> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/core/src/main/java/hivemall/HivemallConstants.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/hivemall/HivemallConstants.java b/core/src/main/java/hivemall/HivemallConstants.java index 67bb228..f5db306 100644 --- a/core/src/main/java/hivemall/HivemallConstants.java +++ b/core/src/main/java/hivemall/HivemallConstants.java @@ -18,7 +18,6 @@ */ package hivemall; - public final class HivemallConstants { public static final String VERSION = "0.4.2-rc.2"; http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/core/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/core/src/main/resources/log4j.properties b/core/src/main/resources/log4j.properties index ebfe13e..fb171b4 100644 --- a/core/src/main/resources/log4j.properties +++ b/core/src/main/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootLogger=INFO, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/core/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/core/src/test/resources/log4j.properties b/core/src/test/resources/log4j.properties index 9ea60f8..ec94d80 100644 --- a/core/src/test/resources/log4j.properties +++ b/core/src/test/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootLogger=ERROR, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/docs/gitbook/book.json ---------------------------------------------------------------------- diff --git a/docs/gitbook/book.json b/docs/gitbook/book.json index b622a7b..9a385bf 100644 --- a/docs/gitbook/book.json +++ b/docs/gitbook/book.json @@ -29,7 +29,7 @@ "split": false }, "edit-link": { - "base": "https://github.com/apache/incubator-hivemall/docs/gitbook", + "base": "https://github.com/apache/incubator-hivemall/tree/master/docs/gitbook", "label": "Edit" }, "github": { http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/docs/gitbook/misc/tokenizer.md ---------------------------------------------------------------------- diff --git a/docs/gitbook/misc/tokenizer.md b/docs/gitbook/misc/tokenizer.md index b691230..c7eb6b9 100644 --- a/docs/gitbook/misc/tokenizer.md +++ b/docs/gitbook/misc/tokenizer.md @@ -75,7 +75,7 @@ select tokenize_ja("æ¥æ¬çµæ¸æ°èï¼é¢è¥¿å½é空港", "normal", null, nu > ["æ¥æ¬","çµæ¸","æ°è","é¢è¥¿","å½é","空港"] -Note that you can pass `null` to each of the third and fourth argument to explicitly use Kuromoji's default stop words and stop tags. +Note that you can pass `null` to each of the third and fourth argument to explicitly use Kuromoji's [default stop words](https://github.com/apache/lucene-solr/blob/master/lucene/analysis/kuromoji/src/resources/org/apache/lucene/analysis/ja/stopwords.txt) and [stop tags](https://github.com/apache/lucene-solr/blob/master/lucene/analysis/kuromoji/src/resources/org/apache/lucene/analysis/ja/stoptags.txt). If you have a large custom dictionary as an external file, `userDict` can also be `const string userDictURL` which indicates URL of the external file on somewhere like Amazon S3: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/mixserv/pom.xml ---------------------------------------------------------------------- diff --git a/mixserv/pom.xml b/mixserv/pom.xml index b7300cb..c5f12a8 100644 --- a/mixserv/pom.xml +++ b/mixserv/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> <relativePath>../pom.xml</relativePath> @@ -88,7 +88,7 @@ <!-- compile scope --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-core</artifactId> <version>${project.version}</version> <scope>compile</scope> @@ -166,7 +166,7 @@ <createDependencyReducedPom>false</createDependencyReducedPom> <artifactSet> <includes> - <include>io.github.myui:hivemall-core</include> + <include>org.apache.hivemall:hivemall-core</include> <include>commons-cli:commons-cli</include> <include>commons-logging:commons-logging</include> <include>log4j:log4j</include> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/mixserv/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/mixserv/src/test/resources/log4j.properties b/mixserv/src/test/resources/log4j.properties index 8965038..777cb07 100644 --- a/mixserv/src/test/resources/log4j.properties +++ b/mixserv/src/test/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootLogger=ERROR, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/nlp/pom.xml ---------------------------------------------------------------------- diff --git a/nlp/pom.xml b/nlp/pom.xml index 3941872..686f116 100644 --- a/nlp/pom.xml +++ b/nlp/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> <relativePath>../pom.xml</relativePath> @@ -104,7 +104,7 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-core</artifactId> <version>${project.version}</version> <scope>provided</scope> @@ -175,7 +175,7 @@ <createDependencyReducedPom>false</createDependencyReducedPom> <artifactSet> <includes> - <include>io.github.myui:hivemall-core</include> + <include>org.apache.hivemall:hivemall-core</include> <include>org.apache.lucene:lucene-analyzers-kuromoji</include> <include>org.apache.lucene:lucene-analyzers-smartcn</include> <include>org.apache.lucene:lucene-analyzers-common</include> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/nlp/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/nlp/src/test/resources/log4j.properties b/nlp/src/test/resources/log4j.properties index 8965038..777cb07 100644 --- a/nlp/src/test/resources/log4j.properties +++ b/nlp/src/test/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootLogger=ERROR, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 64aec8f..d7c5391 100644 --- a/pom.xml +++ b/pom.xml @@ -20,10 +20,16 @@ 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>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> + <parent> + <groupId>org.apache</groupId> + <artifactId>apache</artifactId> + <version>18</version> + </parent> + <name>Apache Hivemall</name> <description>Scalable Machine Learning Library for Apache Hive, Apache Spark, and Apache Pig</description> <url>http://hivemall.incubator.apache.org/</url> @@ -36,7 +42,7 @@ <licenses> <license> <name>Apache License, Version 2.0</name> - <url>http://opensource.org/licenses/Apache-2.0</url> + <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> <distribution>repo</distribution> </license> </licenses> @@ -236,12 +242,6 @@ </developer> </developers> - <!-- - <contributors> - <contributor> - </contributor> - </contributors> - --> <packaging>pom</packaging> <modules> @@ -254,11 +254,14 @@ <properties> <java.source.version>1.7</java.source.version> <java.target.version>1.7</java.target.version> + <maven.compiler.source>1.7</maven.compiler.source> + <maven.compiler.target>1.7</maven.compiler.target> <scala.version>2.11.8</scala.version> <scala.binary.version>2.11</scala.binary.version> <maven.build.timestamp.format>yyyy</maven.build.timestamp.format> <build.year>${maven.build.timestamp}</build.year> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <protobuf.version>2.5.0</protobuf.version> <protoc.path>${env.PROTOC_PATH}</protoc.path> <hadoop.version>2.4.0</hadoop.version> @@ -267,15 +270,49 @@ <junit.version>4.12</junit.version> <dependency.locations.enabled>false</dependency.locations.enabled> <main.basedir>${project.basedir}</main.basedir> + <maven-enforcer-plugin.version>3.0.0-M1</maven-enforcer-plugin.version> + <surefire.version>2.19.1</surefire.version> </properties> <distributionManagement> + <repository> + <id>apache.releases.https</id> + <name>Apache Release Distribution Repository</name> + <url>https://repository.apache.org/service/local/staging/deploy/maven2</url> + </repository> + <snapshotRepository> + <id>apache.snapshots.https</id> + <name>Apache Development Snapshot Repository</name> + <url>https://repository.apache.org/content/repositories/snapshots</url> + </snapshotRepository> + <!-- <snapshotRepository> <id>ossrh</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </snapshotRepository> + --> </distributionManagement> + <repositories> + <repository> + <id>apache.snapshots</id> + <name>Apache Snapshot Repository</name> + <url>https://repository.apache.org/snapshots</url> + <releases> + <enabled>true</enabled> + </releases> + </repository> + </repositories> + + <issueManagement> + <url>https://issues.apache.org/jira/browse/HIVEMALL/</url> + <system>JIRA</system> + </issueManagement> + <ciManagement> + <system>Travis CI</system> + <url>https://travis-ci.org/apache/incubator-hivemall</url> + </ciManagement> + <profiles> <profile> <id>spark-2.2</id> @@ -293,7 +330,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>1.4.1</version> + <version>${maven-enforcer-plugin.version}</version> <executions> <execution> <id>enforce-versions</id> @@ -343,24 +380,24 @@ <spark.binary.version>2.0</spark.binary.version> </properties> </profile> - <profile> - <id>java7</id> - <properties> - <spark.test.jvm.opts>-ea -Xms768m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=512m</spark.test.jvm.opts> - </properties> - <activation> - <jdk>[,1.8)</jdk> <!-- version < 1.8 --> - </activation> - </profile> - <profile> - <id>java8</id> - <properties> - <spark.test.jvm.opts>-ea -Xms768m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:ReservedCodeCacheSize=512m</spark.test.jvm.opts> - </properties> - <activation> - <jdk>[1.8,)</jdk> <!-- version >= 1.8 --> - </activation> - </profile> + <profile> + <id>java7</id> + <properties> + <spark.test.jvm.opts>-ea -Xms768m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=512m</spark.test.jvm.opts> + </properties> + <activation> + <jdk>[,1.8)</jdk> <!-- version < 1.8 --> + </activation> + </profile> + <profile> + <id>java8</id> + <properties> + <spark.test.jvm.opts>-ea -Xms768m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:ReservedCodeCacheSize=512m</spark.test.jvm.opts> + </properties> + <activation> + <jdk>[1.8,)</jdk> <!-- version >= 1.8 --> + </activation> + </profile> <profile> <id>compile-xgboost</id> <build> @@ -393,73 +430,6 @@ <javadoc.opts>-Xdoclint:none</javadoc.opts> </properties> </profile> - <!-- start maven central --> - <profile> - <id>release-sign-artifacts</id> - <activation> - <property> - <name>performRelease</name> - <value>true</value> - </property> - </activation> - <build> - <plugins> - <!-- sources.jar --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <executions> - <execution> - <id>attach-sources</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <!-- javadoc.jar --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <configuration> - <locale>en_US</locale> - <docencoding>UTF-8</docencoding> - <show>protected</show> - <linksource>true</linksource> - </configuration> - <executions> - <execution> - <id>attach-javadocs</id> - <goals> - <goal>jar</goal> - </goals> - <configuration> - <!-- workaround for Java 8 --> - <!-- see http://stackoverflow.com/questions/15886209/maven-is-not-working-in-java-8-when-javadoc-tags-are-incomplete --> - <additionalparam>${javadoc.opts}</additionalparam> - </configuration> - </execution> - </executions> - </plugin> - <!-- gpg sign --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-gpg-plugin</artifactId> - <version>1.5</version> - <executions> - <execution> - <id>sign-artifacts</id> - <phase>verify</phase> - <goals> - <goal>sign</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - <!-- end maven central --> </profiles> <build> @@ -522,11 +492,60 @@ </execution> </executions> </plugin> + <!-- mvn apache-rat:check --> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <version>0.12</version> + </plugin> + <!-- javadoc.jar --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <locale>en_US</locale> + <docencoding>UTF-8</docencoding> + <show>protected</show> + <linksource>true</linksource> + </configuration> + <executions> + <execution> + <id>attach-javadocs</id> + <goals> + <goal>jar</goal> + </goals> + <configuration> + <!-- workaround for Java 8 --> + <!-- see http://stackoverflow.com/questions/15886209/maven-is-not-working-in-java-8-when-javadoc-tags-are-incomplete --> + <additionalparam>${javadoc.opts}</additionalparam> + </configuration> + </execution> + </executions> + </plugin> </plugins> </pluginManagement> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce-maven</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requireMavenVersion> + <version>[3.3.1,)</version> + </requireMavenVersion> + </rules> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <!-- mvn formatter:format --> <groupId>net.revelc.code</groupId> <artifactId>formatter-maven-plugin</artifactId> @@ -539,7 +558,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>2.17</version> <configuration> <skipTests>${skipTests}</skipTests> </configuration> @@ -547,7 +565,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> <configuration> <source>${java.source.version}</source> <target>${java.target.version}</target> @@ -559,7 +576,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.14.1</version> <configuration> <enableAssertions>true</enableAssertions> <forkCount>1</forkCount> @@ -615,25 +631,10 @@ </plugin> --> <!-- end overalls --> - <!-- start sonatype deploy --> - <!-- mvn clean deploy -DperformRelease=true -Dskiptests=true -Dmaven.test.skip=true --> - <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> - <version>1.6.3</version> - <extensions>true</extensions> - <configuration> - <serverId>ossrh</serverId> - <nexusUrl>https://oss.sonatype.org/</nexusUrl> - <autoReleaseAfterClose>true</autoReleaseAfterClose> - </configuration> - </plugin> - <!-- end sonatype deploy --> <!-- start mvn site --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>3.5.1</version> <dependencies> <dependency> <groupId>org.apache.maven.doxia</groupId> @@ -667,35 +668,23 @@ </execution> </executions> </plugin> - </plugins> - </build> - - <!-- - <reporting> - <plugins> + <!-- mvn apache-rat:check --> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-changes-plugin</artifactId> - <version>2.12</version> - <reportSets> - <reportSet> - <reports> - <report>changes-report</report> - </reports> - </reportSet> - </reportSets> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <configuration> + <excludesFile>.rat-excludes</excludesFile> + </configuration> + <executions> + <execution> + <phase>verify</phase> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> </plugin> </plugins> - </reporting> - --> - - <issueManagement> - <url>https://issues.apache.org/jira/browse/HIVEMALL/</url> - <system>JIRA</system> - </issueManagement> - <ciManagement> - <system>Travis CI</system> - <url>https://travis-ci.org/apache/incubator-hivemall</url> - </ciManagement> + </build> </project> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/ddl/import-packages.spark ---------------------------------------------------------------------- diff --git a/resources/ddl/import-packages.spark b/resources/ddl/import-packages.spark index 7476ae3..c3a4955 100644 --- a/resources/ddl/import-packages.spark +++ b/resources/ddl/import-packages.spark @@ -1,3 +1,22 @@ +/* + * 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. + */ + /** * An initialization script for DataFrame use */ http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/Dockerfile ---------------------------------------------------------------------- diff --git a/resources/docker/Dockerfile b/resources/docker/Dockerfile index 8781956..6332f4c 100644 --- a/resources/docker/Dockerfile +++ b/resources/docker/Dockerfile @@ -1,3 +1,22 @@ +# +# 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. +# + FROM openjdk:7 WORKDIR /root/ http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/docker-compose.yml ---------------------------------------------------------------------- diff --git a/resources/docker/docker-compose.yml b/resources/docker/docker-compose.yml index 5c7b594..0aa8f75 100644 --- a/resources/docker/docker-compose.yml +++ b/resources/docker/docker-compose.yml @@ -1,3 +1,22 @@ +# +# 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. +# + version: '2' services: hivemall: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/etc/hadoop/core-site.xml ---------------------------------------------------------------------- diff --git a/resources/docker/etc/hadoop/core-site.xml b/resources/docker/etc/hadoop/core-site.xml index 1cbd950..9b94a80 100644 --- a/resources/docker/etc/hadoop/core-site.xml +++ b/resources/docker/etc/hadoop/core-site.xml @@ -1,4 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/etc/hadoop/hdfs-site.xml ---------------------------------------------------------------------- diff --git a/resources/docker/etc/hadoop/hdfs-site.xml b/resources/docker/etc/hadoop/hdfs-site.xml index 98c8849..daee2c9 100644 --- a/resources/docker/etc/hadoop/hdfs-site.xml +++ b/resources/docker/etc/hadoop/hdfs-site.xml @@ -1,4 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/etc/hadoop/mapred-site.xml ---------------------------------------------------------------------- diff --git a/resources/docker/etc/hadoop/mapred-site.xml b/resources/docker/etc/hadoop/mapred-site.xml index a115f99..ae8fa36 100644 --- a/resources/docker/etc/hadoop/mapred-site.xml +++ b/resources/docker/etc/hadoop/mapred-site.xml @@ -1,4 +1,22 @@ <?xml version="1.0"?> +<!-- + 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. +--> <configuration> <property> <name>mapreduce.framework.name</name> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/etc/hadoop/yarn-site.xml ---------------------------------------------------------------------- diff --git a/resources/docker/etc/hadoop/yarn-site.xml b/resources/docker/etc/hadoop/yarn-site.xml index 98b3c50..7fb2fa3 100644 --- a/resources/docker/etc/hadoop/yarn-site.xml +++ b/resources/docker/etc/hadoop/yarn-site.xml @@ -1,4 +1,22 @@ <?xml version="1.0"?> +<!-- + 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. +--> <configuration> <property> <name>yarn.nodemanager.aux-services</name> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/home/bin/init.sh ---------------------------------------------------------------------- diff --git a/resources/docker/home/bin/init.sh b/resources/docker/home/bin/init.sh index 0b21cd5..9ec8e76 100755 --- a/resources/docker/home/bin/init.sh +++ b/resources/docker/home/bin/init.sh @@ -1,4 +1,22 @@ #!/bin/sh -eux +# +# 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. +# /etc/init.d/ssh start $HADOOP_HOME/sbin/start-dfs.sh http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/docker/home/bin/prepare_iris.sh ---------------------------------------------------------------------- diff --git a/resources/docker/home/bin/prepare_iris.sh b/resources/docker/home/bin/prepare_iris.sh index 944de08..e5d41e7 100755 --- a/resources/docker/home/bin/prepare_iris.sh +++ b/resources/docker/home/bin/prepare_iris.sh @@ -1,4 +1,22 @@ #!/bin/sh -eux +# +# 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. +# DATA_DIR='/root/data' HDFS_DATA_DIR='/dataset/iris/raw' http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/examples/kddtrack2/kddconv.awk ---------------------------------------------------------------------- diff --git a/resources/examples/kddtrack2/kddconv.awk b/resources/examples/kddtrack2/kddconv.awk index c4e5edf..26bdef9 100644 --- a/resources/examples/kddtrack2/kddconv.awk +++ b/resources/examples/kddtrack2/kddconv.awk @@ -1,3 +1,23 @@ +#!/bin/awk +# +# 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. +# + BEGIN{ FS="\t" } { rowid=$1; http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/examples/kddtrack2/scoreKDD.py ---------------------------------------------------------------------- diff --git a/resources/examples/kddtrack2/scoreKDD.py b/resources/examples/kddtrack2/scoreKDD.py deleted file mode 100644 index 5d5c670..0000000 --- a/resources/examples/kddtrack2/scoreKDD.py +++ /dev/null @@ -1,206 +0,0 @@ -""" -Scoring Metrics for KDD Cup 2012, Track 2 - -Reads in a solution/subission files - -Scores on the following three metrics: --NWMAE --WRMSE --AUC - -Author: Ben Hamner ([email protected]) -""" - -def scoreElementwiseMetric(num_clicks, num_impressions, predicted_ctr, elementwise_metric): - """ - Calculates an elementwise error metric - - Parameters - ---------- - num_clicks : a list containing the number of clicks - - num_impressions : a list containing the number of impressions - - predicted_ctr : a list containing the predicted click-through rates - - elementwise_metric : a function such as MSE that evaluates the error on a single instance, given the clicks, impressions, and p_ctr - - Returns - ------- - score : the error on the elementwise metric over the set - """ - score = 0.0 - weight_sum = 0.0 - - for clicks, impressions, p_ctr in zip(num_clicks, num_impressions, predicted_ctr): - score += elementwise_metric(clicks, impressions, p_ctr)*impressions - weight_sum += impressions - score = score / weight_sum - return score - -def scoreWRMSE(num_clicks, num_impressions, predicted_ctr): - """ - Calculates the Weighted Root Mean Squared Error (WRMSE) - - Parameters - ---------- - num_clicks : a list containing the number of clicks - - num_impressions : a list containing the number of impressions - - predicted_ctr : a list containing the predicted click-through rates - - Returns - ------- - wrmse : the weighted root mean squared error - """ - import math - - mse = lambda clicks, impressions, p_ctr: math.pow(clicks/impressions-p_ctr,2.0) - wmse = scoreElementwiseMetric(num_clicks, num_impressions, predicted_ctr, mse) - wrmse = math.sqrt(wmse) - return wrmse - -def scoreNWMAE(num_clicks, num_impressions, predicted_ctr): - """ - Calculates the normalized weighted mean absolute error - - Parameters - ---------- - num_clicks : a list containing the number of clicks - - num_impressions : a list containing the number of impressions - - predicted_ctr : a list containing the predicted click-through rates - - Returns - ------- - nwmae : the normalized weighted mean absolute error - """ - mae = lambda clicks, impressions, p_ctr: abs(clicks/impressions-p_ctr) - nwmae = scoreElementwiseMetric(num_clicks, num_impressions, predicted_ctr, mae) - return nwmae - -def scoreClickAUC(num_clicks, num_impressions, predicted_ctr): - """ - Calculates the area under the ROC curve (AUC) for click rates - - Parameters - ---------- - num_clicks : a list containing the number of clicks - - num_impressions : a list containing the number of impressions - - predicted_ctr : a list containing the predicted click-through rates - - Returns - ------- - auc : the area under the ROC curve (AUC) for click rates - """ - i_sorted = sorted(range(len(predicted_ctr)),key=lambda i: predicted_ctr[i], - reverse=True) - auc_temp = 0.0 - click_sum = 0.0 - old_click_sum = 0.0 - no_click = 0.0 - no_click_sum = 0.0 - - # treat all instances with the same predicted_ctr as coming from the - # same bucket - last_ctr = predicted_ctr[i_sorted[0]] + 1.0 - #last_ctr = float("nan") - - for i in range(len(predicted_ctr)): - if last_ctr != predicted_ctr[i_sorted[i]]: - auc_temp += (click_sum+old_click_sum) * no_click / 2.0 - old_click_sum = click_sum - no_click = 0.0 - last_ctr = predicted_ctr[i_sorted[i]] - no_click += num_impressions[i_sorted[i]] - num_clicks[i_sorted[i]] - no_click_sum += num_impressions[i_sorted[i]] - num_clicks[i_sorted[i]] - click_sum += num_clicks[i_sorted[i]] - auc_temp += (click_sum+old_click_sum) * no_click / 2.0 - auc = auc_temp / (click_sum * no_click_sum) - return auc - -def read_solution_file(f_sol_name): - """ - Reads in a solution file - - Parameters - ---------- - f_sol_name : submission file name - - Returns - ------- - num_clicks : a list of clicks - num_impressions : a list of impressions - """ - f_sol = open(f_sol_name) - - num_clicks = [] - num_impressions = [] - - i = 0 - for line in f_sol: - line = line.strip().split(",") - try: - clicks = float(line[0]) - impressions = float(line[1]) - except ValueError as e: - # skip over header - if(i!=0): - print("parse error at line: %d" % i) - print(e) - continue - num_clicks.append(clicks) - num_impressions.append(impressions) - i += 1 - print("submission length=%d" % i) - return (num_clicks, num_impressions) - -def read_submission_file(f_sub_name): - """ - Reads in a submission file - - Parameters - ---------- - f_sub_name : submission file name - - Returns - ------- - predicted_ctr : a list of predicted click-through rates - """ - f_sub = open(f_sub_name) - - predicted_ctr = [] - - for line in f_sub: - line = line.strip().split(",") - predicted_ctr.append(float(line[0])) - #predicted_ctr.append(float(line)) - - return predicted_ctr - -def main(): - import sys - if len(sys.argv) != 3: - print("Usage: python scoreKDD.py solution_file.csv submission_file.csv") - sys.exit(2) - - num_clicks, num_impressions = read_solution_file(sys.argv[1]) - predicted_ctr = read_submission_file(sys.argv[2]) - - print("num_clicks : %d" % len(num_clicks)) - print("num_impressions : %d" % len(num_impressions)) - print("num_predicted_ctrs: %d" % len(predicted_ctr)) - - auc = scoreClickAUC(num_clicks, num_impressions, predicted_ctr) - print("AUC : %f" % auc) - nwmae = scoreNWMAE(num_clicks, num_impressions, predicted_ctr) - print("NWMAE: %f" % nwmae) - wrmse = scoreWRMSE(num_clicks, num_impressions, predicted_ctr) - print("WRMSE: %f" % wrmse) - -if __name__=="__main__": - main() http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/examples/movielens/generate_cv.sh ---------------------------------------------------------------------- diff --git a/resources/examples/movielens/generate_cv.sh b/resources/examples/movielens/generate_cv.sh index 78f4a0d..20c92ab 100644 --- a/resources/examples/movielens/generate_cv.sh +++ b/resources/examples/movielens/generate_cv.sh @@ -1,4 +1,22 @@ #!/bin/bash +# +# 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. +# nfolds=10 http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/header-definition.xml ---------------------------------------------------------------------- diff --git a/resources/header-definition.xml b/resources/header-definition.xml index e28f8f8..76d6049 100644 --- a/resources/header-definition.xml +++ b/resources/header-definition.xml @@ -1,4 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> <additionalHeaders> <javadoc_style> <firstLine>/*</firstLine> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/hivemall-checkstyle.xml ---------------------------------------------------------------------- diff --git a/resources/hivemall-checkstyle.xml b/resources/hivemall-checkstyle.xml index 8b9543d..e1fea2a 100644 --- a/resources/hivemall-checkstyle.xml +++ b/resources/hivemall-checkstyle.xml @@ -1,4 +1,22 @@ <?xml version="1.0"?> +<!-- + 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. +--> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/misc/conv.awk ---------------------------------------------------------------------- diff --git a/resources/misc/conv.awk b/resources/misc/conv.awk index 0a59291..bb09c59 100644 --- a/resources/misc/conv.awk +++ b/resources/misc/conv.awk @@ -1,3 +1,22 @@ +# +# 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. +# + BEGIN{ FS=" " } { label=$1; http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/misc/conv_pig.awk ---------------------------------------------------------------------- diff --git a/resources/misc/conv_pig.awk b/resources/misc/conv_pig.awk index 7c00649..d583a76 100644 --- a/resources/misc/conv_pig.awk +++ b/resources/misc/conv_pig.awk @@ -1,3 +1,22 @@ +# +# 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. +# + BEGIN{ FS=" " } { label=$1; http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/misc/emr_hivemall_bootstrap.sh ---------------------------------------------------------------------- diff --git a/resources/misc/emr_hivemall_bootstrap.sh b/resources/misc/emr_hivemall_bootstrap.sh index ad41fbf..5af6fb6 100644 --- a/resources/misc/emr_hivemall_bootstrap.sh +++ b/resources/misc/emr_hivemall_bootstrap.sh @@ -1,4 +1,22 @@ #!/bin/bash +# +# 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. +# mkdir -p /home/hadoop/tmp wget --no-check-certificate -P /home/hadoop/tmp \ http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/resources/misc/one-vs-rest.awk ---------------------------------------------------------------------- diff --git a/resources/misc/one-vs-rest.awk b/resources/misc/one-vs-rest.awk index 530955e..df7d248 100644 --- a/resources/misc/one-vs-rest.awk +++ b/resources/misc/one-vs-rest.awk @@ -1,3 +1,22 @@ +# +# 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. +# + BEGIN{ FS="\t"; OFS="\t"; } { possible_labels=$1; http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.0/pom.xml ---------------------------------------------------------------------- diff --git a/spark/spark-2.0/pom.xml b/spark/spark-2.0/pom.xml index e5fa28d..f42d165 100644 --- a/spark/spark-2.0/pom.xml +++ b/spark/spark-2.0/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> <relativePath>../../pom.xml</relativePath> @@ -38,19 +38,19 @@ <dependencies> <!-- hivemall dependencies --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-core</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-xgboost</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-spark-common</artifactId> <version>${project.version}</version> <scope>compile</scope> @@ -104,7 +104,7 @@ <!-- test dependencies --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-mixserv</artifactId> <version>${project.version}</version> <scope>test</scope> @@ -195,9 +195,9 @@ <createDependencyReducedPom>false</createDependencyReducedPom> <artifactSet> <includes> - <include>io.github.myui:hivemall-core</include> - <include>io.github.myui:hivemall-xgboost</include> - <include>io.github.myui:hivemall-spark-common</include> + <include>org.apache.hivemall:hivemall-core</include> + <include>org.apache.hivemall:hivemall-xgboost</include> + <include>org.apache.hivemall:hivemall-spark-common</include> <include>com.github.haifengl:smile-core</include> <include>com.github.haifengl:smile-math</include> <include>com.github.haifengl:smile-data</include> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.0/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/spark/spark-2.0/src/main/resources/log4j.properties b/spark/spark-2.0/src/main/resources/log4j.properties index 72bf5b6..ef4f606 100644 --- a/spark/spark-2.0/src/main/resources/log4j.properties +++ b/spark/spark-2.0/src/main/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootCategory=INFO, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.0/src/test/resources/data/files/README.md ---------------------------------------------------------------------- diff --git a/spark/spark-2.0/src/test/resources/data/files/README.md b/spark/spark-2.0/src/test/resources/data/files/README.md index 0fd0299..238d472 100644 --- a/spark/spark-2.0/src/test/resources/data/files/README.md +++ b/spark/spark-2.0/src/test/resources/data/files/README.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + The files in this dir exist for preventing exceptions in o.a.s.sql.hive.test.TESTHive. We need to fix this issue in future. http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.0/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/spark/spark-2.0/src/test/resources/log4j.properties b/spark/spark-2.0/src/test/resources/log4j.properties index 1db11f0..c6e4297 100644 --- a/spark/spark-2.0/src/test/resources/log4j.properties +++ b/spark/spark-2.0/src/test/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootCategory=FATAL, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.1/pom.xml ---------------------------------------------------------------------- diff --git a/spark/spark-2.1/pom.xml b/spark/spark-2.1/pom.xml index 8f9e818..c08bedd 100644 --- a/spark/spark-2.1/pom.xml +++ b/spark/spark-2.1/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> <relativePath>../../pom.xml</relativePath> @@ -38,19 +38,19 @@ <dependencies> <!-- hivemall dependencies --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-core</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-xgboost</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-spark-common</artifactId> <version>${project.version}</version> <scope>compile</scope> @@ -104,7 +104,7 @@ <!-- test dependencies --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-mixserv</artifactId> <version>${project.version}</version> <scope>test</scope> @@ -195,9 +195,9 @@ <createDependencyReducedPom>false</createDependencyReducedPom> <artifactSet> <includes> - <include>io.github.myui:hivemall-core</include> - <include>io.github.myui:hivemall-xgboost</include> - <include>io.github.myui:hivemall-spark-common</include> + <include>org.apache.hivemall:hivemall-core</include> + <include>org.apache.hivemall:hivemall-xgboost</include> + <include>org.apache.hivemall:hivemall-spark-common</include> <include>com.github.haifengl:smile-core</include> <include>com.github.haifengl:smile-math</include> <include>com.github.haifengl:smile-data</include> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.1/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/spark/spark-2.1/src/main/resources/log4j.properties b/spark/spark-2.1/src/main/resources/log4j.properties index 72bf5b6..ef4f606 100644 --- a/spark/spark-2.1/src/main/resources/log4j.properties +++ b/spark/spark-2.1/src/main/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootCategory=INFO, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.1/src/test/resources/data/files/README.md ---------------------------------------------------------------------- diff --git a/spark/spark-2.1/src/test/resources/data/files/README.md b/spark/spark-2.1/src/test/resources/data/files/README.md index 0fd0299..238d472 100644 --- a/spark/spark-2.1/src/test/resources/data/files/README.md +++ b/spark/spark-2.1/src/test/resources/data/files/README.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + The files in this dir exist for preventing exceptions in o.a.s.sql.hive.test.TESTHive. We need to fix this issue in future. http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.1/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/spark/spark-2.1/src/test/resources/log4j.properties b/spark/spark-2.1/src/test/resources/log4j.properties index 1db11f0..c6e4297 100644 --- a/spark/spark-2.1/src/test/resources/log4j.properties +++ b/spark/spark-2.1/src/test/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootCategory=FATAL, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.2/extra-src/README.md ---------------------------------------------------------------------- diff --git a/spark/spark-2.2/extra-src/README.md b/spark/spark-2.2/extra-src/README.md index 1d89d0a..bdffa37 100644 --- a/spark/spark-2.2/extra-src/README.md +++ b/spark/spark-2.2/extra-src/README.md @@ -1 +1,20 @@ +<!-- + 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. +--> + Copyed from the spark v2.2.0 release. http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.2/pom.xml ---------------------------------------------------------------------- diff --git a/spark/spark-2.2/pom.xml b/spark/spark-2.2/pom.xml index 03b7cda..fddfcc6 100644 --- a/spark/spark-2.2/pom.xml +++ b/spark/spark-2.2/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> <relativePath>../../pom.xml</relativePath> @@ -41,19 +41,19 @@ <dependencies> <!-- hivemall dependencies --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-core</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-xgboost</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-spark-common</artifactId> <version>${project.version}</version> <scope>compile</scope> @@ -107,7 +107,7 @@ <!-- test dependencies --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-mixserv</artifactId> <version>${project.version}</version> <scope>test</scope> @@ -201,9 +201,9 @@ <createDependencyReducedPom>false</createDependencyReducedPom> <artifactSet> <includes> - <include>io.github.myui:hivemall-core</include> - <include>io.github.myui:hivemall-xgboost</include> - <include>io.github.myui:hivemall-spark-common</include> + <include>org.apache.hivemall:hivemall-core</include> + <include>org.apache.hivemall:hivemall-xgboost</include> + <include>org.apache.hivemall:hivemall-spark-common</include> <include>com.github.haifengl:smile-core</include> <include>com.github.haifengl:smile-math</include> <include>com.github.haifengl:smile-data</include> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.2/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/spark/spark-2.2/src/main/resources/log4j.properties b/spark/spark-2.2/src/main/resources/log4j.properties index 72bf5b6..ef4f606 100644 --- a/spark/spark-2.2/src/main/resources/log4j.properties +++ b/spark/spark-2.2/src/main/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootCategory=INFO, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.2/src/test/resources/data/files/README.md ---------------------------------------------------------------------- diff --git a/spark/spark-2.2/src/test/resources/data/files/README.md b/spark/spark-2.2/src/test/resources/data/files/README.md index 0fd0299..238d472 100644 --- a/spark/spark-2.2/src/test/resources/data/files/README.md +++ b/spark/spark-2.2/src/test/resources/data/files/README.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + The files in this dir exist for preventing exceptions in o.a.s.sql.hive.test.TESTHive. We need to fix this issue in future. http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-2.2/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/spark/spark-2.2/src/test/resources/log4j.properties b/spark/spark-2.2/src/test/resources/log4j.properties index 1db11f0..c6e4297 100644 --- a/spark/spark-2.2/src/test/resources/log4j.properties +++ b/spark/spark-2.2/src/test/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + # Set everything to be logged to the console log4j.rootCategory=FATAL, console log4j.appender.console=org.apache.log4j.ConsoleAppender http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-common/pom.xml ---------------------------------------------------------------------- diff --git a/spark/spark-common/pom.xml b/spark/spark-common/pom.xml index 3153a75..ef4c3f3 100644 --- a/spark/spark-common/pom.xml +++ b/spark/spark-common/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall</artifactId> <version>0.4.2-rc.2</version> <relativePath>../../pom.xml</relativePath> @@ -38,7 +38,7 @@ <dependencies> <!-- hivemall dependencies --> <dependency> - <groupId>io.github.myui</groupId> + <groupId>org.apache.hivemall</groupId> <artifactId>hivemall-core</artifactId> <version>${project.version}</version> <scope>compile</scope> http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/131eb060/spark/spark-common/src/main/java/hivemall/dataset/LogisticRegressionDataGeneratorUDTFWrapper.java ---------------------------------------------------------------------- diff --git a/spark/spark-common/src/main/java/hivemall/dataset/LogisticRegressionDataGeneratorUDTFWrapper.java b/spark/spark-common/src/main/java/hivemall/dataset/LogisticRegressionDataGeneratorUDTFWrapper.java index c06e6bc..cf10ed7 100644 --- a/spark/spark-common/src/main/java/hivemall/dataset/LogisticRegressionDataGeneratorUDTFWrapper.java +++ b/spark/spark-common/src/main/java/hivemall/dataset/LogisticRegressionDataGeneratorUDTFWrapper.java @@ -18,6 +18,8 @@ */ package hivemall.dataset; +import hivemall.UDTFWithOptions; + import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Random; @@ -32,8 +34,6 @@ import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; -import hivemall.UDTFWithOptions; - /** * A wrapper of [[hivemall.dataset.LogisticRegressionDataGeneratorUDTF]]. This wrapper is needed * because Spark cannot handle HadoopUtils#getTaskId() correctly. @@ -41,7 +41,8 @@ import hivemall.UDTFWithOptions; @Description(name = "lr_datagen", value = "_FUNC_(options string) - Generates a logistic regression dataset") public final class LogisticRegressionDataGeneratorUDTFWrapper extends UDTFWithOptions { - private transient LogisticRegressionDataGeneratorUDTF udtf = new LogisticRegressionDataGeneratorUDTF(); + private transient LogisticRegressionDataGeneratorUDTF udtf = + new LogisticRegressionDataGeneratorUDTF(); @Override protected Options getOptions() { @@ -56,6 +57,7 @@ public final class LogisticRegressionDataGeneratorUDTFWrapper extends UDTFWithOp return options; } + @SuppressWarnings("all") @Override protected CommandLine processOptions(ObjectInspector[] objectInspectors) throws UDFArgumentException {
