GitHub user zzcclp opened a pull request:
https://github.com/apache/carbondata/pull/1738 [CARBONDATA-1932]Add version info for CarbonData Add version info for CarbonData. The way of generating version info is the same as spark. Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? - [ ] Any backward compatibility impacted? - [ ] Document update required? - [ ] Testing done Please provide details on - Whether new unit test cases have been added or why no new tests are required? - How it is tested? Please attach test report. - Is it a performance related change? Please attach the performance test report. - Any additional information to help reviewers in testing this change. - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zzcclp/carbondata CARBONDATA-1932 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/1738.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1738 ---- commit 4b1d0bb589ae5dbe911522e891464da12f5ea461 Author: Zhang Zhichao <441586683@...> Date: 2017-12-28T15:41:46Z [CARBONDATA-1932]Add version info for CarbonData Add version info for CarbonData. The way of generating version info is the same as spark. commit 4d3cb1a79666a46565c888b6dec4c880aa36457d Author: Zhang Zhichao <441586683@...> Date: 2017-12-28T15:49:26Z remove user info ---- --- |
Github user zzcclp commented on the issue:
https://github.com/apache/carbondata/pull/1738 @jackylk @xubo245 @chenliang613 please review, thanks. --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2418/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1194/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2422/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1198/ --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on the issue:
https://github.com/apache/carbondata/pull/1738 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2424/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1200/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1738 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2610/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1738 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2613/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1738#discussion_r159033499 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonVersionConstants.java --- @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.core.constants; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import org.apache.carbondata.common.logging.LogService; +import org.apache.carbondata.common.logging.LogServiceFactory; + +public final class CarbonVersionConstants { + + private static final LogService LOGGER = + LogServiceFactory.getLogService(CarbonVersionConstants.class.getName()); + /** + * the file name of CarbonData version info + */ + private static final String CARBONDATA_VERSION_INFO_FILE = + "carbondata-version-info.properties"; + /** + * current CarbonData version + */ + public static final String CARBONDATA_VERSION; + /** + * which branch current version build from + */ + public static final String CARBONDATA_BRANCH; + /** + * the latest commit revision which current branch point to + */ + public static final String CARBONDATA_REVISION; + /** + * the date of building current version + */ + public static final String CARBONDATA_BUILD_DATE; + + static { + // create input stream for CARBONDATA_VERSION_INFO_FILE + InputStream resourceStream = Thread.currentThread().getContextClassLoader() + .getResourceAsStream(CARBONDATA_VERSION_INFO_FILE); + Properties props = new Properties(); + try { + // read CARBONDATA_VERSION_INFO_FILE into props + props.load(resourceStream); + } + catch (IOException ioe) { --- End diff -- move to previous line, and merge with line 65 --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1738#discussion_r159033514 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonVersionConstants.java --- @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.core.constants; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import org.apache.carbondata.common.logging.LogService; +import org.apache.carbondata.common.logging.LogServiceFactory; + +public final class CarbonVersionConstants { + + private static final LogService LOGGER = + LogServiceFactory.getLogService(CarbonVersionConstants.class.getName()); + /** + * the file name of CarbonData version info + */ + private static final String CARBONDATA_VERSION_INFO_FILE = + "carbondata-version-info.properties"; + /** + * current CarbonData version + */ + public static final String CARBONDATA_VERSION; + /** + * which branch current version build from + */ + public static final String CARBONDATA_BRANCH; + /** + * the latest commit revision which current branch point to + */ + public static final String CARBONDATA_REVISION; + /** + * the date of building current version + */ + public static final String CARBONDATA_BUILD_DATE; + + static { + // create input stream for CARBONDATA_VERSION_INFO_FILE + InputStream resourceStream = Thread.currentThread().getContextClassLoader() + .getResourceAsStream(CARBONDATA_VERSION_INFO_FILE); + Properties props = new Properties(); + try { + // read CARBONDATA_VERSION_INFO_FILE into props + props.load(resourceStream); + } + catch (IOException ioe) { + LOGGER.error(ioe, "Error while reading file " + CARBONDATA_VERSION_INFO_FILE); + } + catch (Exception e) { + LOGGER.error(e, "Error loading properties from " + CARBONDATA_VERSION_INFO_FILE); + } + finally { --- End diff -- move to previous line --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1738#discussion_r159034001 --- Diff: core/src/test/java/org/apache/carbondata/core/constants/CarbondataVersionUnitTest.java --- @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.core.constants; + +import org.apache.carbondata.core.constants.CarbonVersionConstants; +import org.apache.commons.lang3.StringUtils; +import org.junit.Test; + +import static junit.framework.TestCase.assertTrue; + +public class CarbondataVersionUnitTest { + + @Test public void testCarbonVersionNotNull() { + assertTrue(StringUtils.isNoneEmpty(CarbonVersionConstants.CARBONDATA_VERSION)); --- End diff -- can you add verification for the version string also. It is ok that we modify this testcase before version release --- |
In reply to this post by qiuchenjian-2
Github user chenliang613 commented on the issue:
https://github.com/apache/carbondata/pull/1738 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2439/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1738 Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1216/ --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1738#discussion_r159080280 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonVersionConstants.java --- @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.core.constants; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import org.apache.carbondata.common.logging.LogService; +import org.apache.carbondata.common.logging.LogServiceFactory; + +public final class CarbonVersionConstants { + + private static final LogService LOGGER = + LogServiceFactory.getLogService(CarbonVersionConstants.class.getName()); + /** + * the file name of CarbonData version info + */ + private static final String CARBONDATA_VERSION_INFO_FILE = + "carbondata-version-info.properties"; + /** + * current CarbonData version + */ + public static final String CARBONDATA_VERSION; + /** + * which branch current version build from + */ + public static final String CARBONDATA_BRANCH; + /** + * the latest commit revision which current branch point to + */ + public static final String CARBONDATA_REVISION; + /** + * the date of building current version + */ + public static final String CARBONDATA_BUILD_DATE; + + static { + // create input stream for CARBONDATA_VERSION_INFO_FILE + InputStream resourceStream = Thread.currentThread().getContextClassLoader() + .getResourceAsStream(CARBONDATA_VERSION_INFO_FILE); + Properties props = new Properties(); + try { + // read CARBONDATA_VERSION_INFO_FILE into props + props.load(resourceStream); + } + catch (IOException ioe) { --- End diff -- done --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1738#discussion_r159080288 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonVersionConstants.java --- @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.core.constants; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import org.apache.carbondata.common.logging.LogService; +import org.apache.carbondata.common.logging.LogServiceFactory; + +public final class CarbonVersionConstants { + + private static final LogService LOGGER = + LogServiceFactory.getLogService(CarbonVersionConstants.class.getName()); + /** + * the file name of CarbonData version info + */ + private static final String CARBONDATA_VERSION_INFO_FILE = + "carbondata-version-info.properties"; + /** + * current CarbonData version + */ + public static final String CARBONDATA_VERSION; + /** + * which branch current version build from + */ + public static final String CARBONDATA_BRANCH; + /** + * the latest commit revision which current branch point to + */ + public static final String CARBONDATA_REVISION; + /** + * the date of building current version + */ + public static final String CARBONDATA_BUILD_DATE; + + static { + // create input stream for CARBONDATA_VERSION_INFO_FILE + InputStream resourceStream = Thread.currentThread().getContextClassLoader() + .getResourceAsStream(CARBONDATA_VERSION_INFO_FILE); + Properties props = new Properties(); + try { + // read CARBONDATA_VERSION_INFO_FILE into props + props.load(resourceStream); + } + catch (IOException ioe) { + LOGGER.error(ioe, "Error while reading file " + CARBONDATA_VERSION_INFO_FILE); + } + catch (Exception e) { + LOGGER.error(e, "Error loading properties from " + CARBONDATA_VERSION_INFO_FILE); + } + finally { --- End diff -- done --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on the issue:
https://github.com/apache/carbondata/pull/1738 @jackylk @chenliang613 @xubo245 fixed according to comments, please review again, thanks. --- |
Free forum by Nabble | Edit this page |