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-410] added test case for file system #317

Closed
wants to merge 5 commits into from

Conversation

anubhav100
Copy link
Contributor

@anubhav100 anubhav100 commented Nov 15, 2016

No description provided.

Configuration config = new Configuration();
//adding local hadoop configuration
config.addResource(new Path("/usr/local/Cellar/hadoop/2.4.0/libexec/etc/hadoop/core-site.xml"));
config.addResource(new Path("/usr/local/Cellar/hadoop/2.4.0/libexec/etc/hadoop/hdfs-site.xml"));
Copy link
Contributor

Choose a reason for hiding this comment

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

please change this configuration file to relative path.

Copy link
Contributor Author

@anubhav100 anubhav100 Nov 15, 2016

Choose a reason for hiding this comment

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

@Hexiaoqiao i have done changes can you have a look?

}

@Test
public void testParentFIle() {
Copy link
Contributor

Choose a reason for hiding this comment

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

testParentFile?

br.close();
fs.close();

fileStatus = new FileStatus(12L, true, 60, 120l, 180L, new Path(fs.getName()));
Copy link
Contributor

Choose a reason for hiding this comment

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

why use URI (fs.getName()) to create FileStatus?

import java.io.OutputStream;
import java.io.OutputStreamWriter;

import static java.lang.System.out;
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest to remove unused import.

import java.io.OutputStream;
import java.io.OutputStreamWriter;

import static java.lang.System.out;
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest to remove unused import.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Hexiaoqiao can you have another look please

}

@Test
public void testgetParentFile() {
Copy link
Contributor

Choose a reason for hiding this comment

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

uniform Naming for parameters: testGetParentFile?

@Hexiaoqiao
Copy link
Contributor

@anubhav100 there are still some exception when run ut, pls ref: http://136.243.101.176:8080/job/ApacheCarbonManualPRBuilder/616/consoleFull

@anubhav100
Copy link
Contributor Author

@Hexiaoqiao thats because we are writing the test cases for exception take a look here

@OverRide public String getCanonicalPath() {
try {
return file.getCanonicalPath();
} catch (IOException e) {
LOGGER
.error(e, "Exception occured" + e.getMessage());
}
return null;
}
Logger.error is printing those exception

@Hexiaoqiao
Copy link
Contributor

LGTM
@anubhav100 thanks for ur contributions. pls rename title following format as "[CARBONDATA-<Jira issue #>] Description of pull request".

@anubhav100 anubhav100 changed the title added test case for file system CARBONDATA-100 [added test case for file system] Nov 15, 2016
@anubhav100
Copy link
Contributor Author

@Hexiaoqiao i renamed pull request

@anubhav100 anubhav100 changed the title CARBONDATA-100 [added test case for file system] [CARBONDATA-410] added test case for file system Nov 15, 2016
@chenliang613
Copy link
Contributor

@anubhav100 the below info only be template for reminding to check everything, the PR description doesn't need to include , please remove it.

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

Make sure the PR title is formatted like:
[CARBONDATA-<Jira issue #>] Description of pull request

Make sure tests pass via mvn clean verify. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).

Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.

If this contribution is large, please file an Apache
Individual Contributor License Agreement.

Testing done

Please provide details on

  • Whether new unit test cases have been added or why no new tests are required?
  • What manual testing you have done?
  • Any additional information to help reviewers in testing this change.
    For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@anubhav100
Copy link
Contributor Author

@chenliang613 i removed template from pr thanks

@anubhav100
Copy link
Contributor Author

@chenliang613 i removed template from pr please merge it

@ravipesala
Copy link
Contributor

LGTM

@asfgit asfgit closed this in 221c575 Nov 17, 2016
Beyyes pushed a commit to Beyyes/carbondata that referenced this pull request Jul 12, 2018
Prepare environment in docker to deploy kubernetes
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.

4 participants