Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CARBONDATA-3097] Optimize getVersionDetails #2919

Closed

Conversation

xubo245
Copy link
Contributor

@xubo245 xubo245 commented Nov 14, 2018

This PR optimize getVersionDetails, including:
1.Support folder path in getVersionDetails
2.support getVersionDetails in CSDK
3.support get version from S3

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

  • Any interfaces changed?
    add
  • Any backward compatibility impacted?
    no
  • Document update required?
    Yes
  • Testing done
    add test case in SDK and CSDK
  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
    JIRA2951

@xubo245 xubo245 changed the title [CARBONDATA-3097] Support folder path in getVersionDetails and support getVersionDetails in CSDK [CARBONDATA-3097] Support folder path in getVersionDetails and support getVersionDetails in SDK/CSDK Nov 14, 2018
@xubo245 xubo245 changed the title [CARBONDATA-3097] Support folder path in getVersionDetails and support getVersionDetails in SDK/CSDK [CARBONDATA-3097] Support folder path in getVersionDetails and support getVersionDetails in CSDK Nov 14, 2018
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1402/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1612/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9660/

@xubo245
Copy link
Contributor Author

xubo245 commented Nov 15, 2018

@KanakaKumar @jackylk @ajantha-bhat @kunal642 Please review it.

@xubo245
Copy link
Contributor Author

xubo245 commented Nov 19, 2018

@KanakaKumar @jackylk @QiangCai @ajantha-bhat Please review it.

@xubo245 xubo245 force-pushed the CARBONDATA-3097_getVersionDetails branch from 22a6bd3 to 0a774fc Compare November 22, 2018 02:38
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1504/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9760/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1712/

@xubo245
Copy link
Contributor Author

xubo245 commented Nov 22, 2018

@KanakaKumar @jackylk @QiangCai @ajantha-bhat @kunal642 Rebased, Please review it.

@xubo245 xubo245 force-pushed the CARBONDATA-3097_getVersionDetails branch from 0a774fc to bedddaa Compare December 3, 2018 09:33
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1619/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9879/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1830/

@xubo245
Copy link
Contributor Author

xubo245 commented Dec 4, 2018

retest this please

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1625/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9885/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1836/

@xubo245
Copy link
Contributor Author

xubo245 commented Dec 4, 2018

Rebased and CI pass,@KanakaKumar @jackylk @QiangCai @ajantha-bhat @kunal642 Please review it.

* @throws IOException
*/
public static String getVersionDetails(String dataFilePath) throws IOException {
public static String getVersionDetails(String path, boolean validate) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is not correct to validate readability through version details. In general new version jars can read all old version files.

Please remove this method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, done

@xubo245 xubo245 force-pushed the CARBONDATA-3097_getVersionDetails branch from bedddaa to e29a2c4 Compare December 18, 2018 07:29
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1818/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2029/

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10078/

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1823/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2033/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10081/

} catch (Exception e) {
Assert.assertTrue(e.getMessage()
.equalsIgnoreCase("Version details is different between different files."));
Assert.fail();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this test case? "Version details is different between different files" exception we never get now right? If thee is no separate validation required, we can remove this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, removed.

public static String getVersionDetails(String dataFilePath) throws IOException {
public static String getVersionDetails(String path) throws IOException {
if (path.endsWith(INDEX_FILE_EXT)) {
throw new RuntimeException("Can't get version details from carbonindex file.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RuntimeException is mentioned in the signature. Should throw IOException.
Also some places in this class throws CarbonDataLoadingException but if not intentional we can change them to IOException as per signature instead of a subclass of RuntimeException (if it was not intentional)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOException is from org.apache.carbondata.sdk.file.CarbonSchemaReader#getVersionDetailsFromDataFile, which is from org.apache.carbondata.core.datastore.FileReader#readByteBuffer, It's better to keep API, don't change it. @KanakaKumar

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1833/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10090/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2041/

@xubo245
Copy link
Contributor Author

xubo245 commented Dec 19, 2018

retest this please

@xubo245 xubo245 force-pushed the CARBONDATA-3097_getVersionDetails branch from c058ac7 to b41eff1 Compare December 19, 2018 02:51
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1838/

@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1839/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2047/

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10096/

@xubo245 xubo245 changed the title [CARBONDATA-3097] Support folder path in getVersionDetails and support getVersionDetails in CSDK [CARBONDATA-3097] Optimize getVersionDetails Dec 19, 2018
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1840/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2048/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10097/

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1975/

@xubo245
Copy link
Contributor Author

xubo245 commented Dec 27, 2018

@KanakaKumar Please check it again.

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10227/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2248/

@xubo245
Copy link
Contributor Author

xubo245 commented Dec 28, 2018

@KanakaKumar Please check it again.

…t getVersionDetails in CSDK

support get Verson from S3

optimize
@xubo245 xubo245 force-pushed the CARBONDATA-3097_getVersionDetails branch from f487130 to 1de02bc Compare January 7, 2019 02:26
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2181/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2396/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10437/

@xubo245
Copy link
Contributor Author

xubo245 commented Jan 7, 2019

@KanakaKumar Please review it again.

@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.1/49/

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/48/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.2/43/

@CarbonDataQA1
Copy link

Build Failed with Spark 2.4.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.4/50/

@xubo245 xubo245 closed this Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants