Skip to content

ACCUMULO-4718 Add CLASSPATH to accumulo-testing script#6

Merged
milleruntime merged 2 commits intoapache:masterfrom
milleruntime:ACCUMULO-4718
Oct 17, 2017
Merged

ACCUMULO-4718 Add CLASSPATH to accumulo-testing script#6
milleruntime merged 2 commits intoapache:masterfrom
milleruntime:ACCUMULO-4718

Conversation

@milleruntime
Copy link
Copy Markdown
Contributor

The test "rw-local Bulk.xml" was throwing errors because it couldn't find the HDFS containing the files to import. The hadoop conf wasn't on the classpath so it was defaulting to the disk "file:///" file system. This doesn't seem to affect the rest of the tests. Not sure if this is the best place to include HADOOP_CONF_DIR...

fi
build_shade_jar
java -Dlog4j.configuration="file:$log4j_config" -cp "$at_shaded_jar" "$randomwalk_main" "$at_props" "$2"
java -Dlog4j.configuration="file:$log4j_config" -cp "$at_shaded_jar:$HADOOP_CONF_DIR" "$randomwalk_main" "$at_props" "$2"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One way we can decouple this from specific environment variables (which may or may not exist), is to simply remove the -cp section, and set CLASSPATH above the call to java.
Something like export CLASSPATH="$at_shaded_jar:$CLASSPATH"

That way, the caller can simply set CLASSPATH=/path/to/hadoop/confdir prior to running the accumulo-testing command.

We could also add a sanity check prior to running java to make sure that the $CLASSPATH contains a directory with core-site.xml and/or hdfs-site.xml (or whatever the Hadoop client configuration uses by default).

Copy link
Copy Markdown
Member

@mikewalch mikewalch left a comment

Choose a reason for hiding this comment

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

Nice bug fix. This should fix should be made when the random walk tests are run in YARN (using rw-yarn command). I will create a ticket for that if you want to work on it.

@milleruntime
Copy link
Copy Markdown
Contributor Author

Sounds good. Thanks

@milleruntime
Copy link
Copy Markdown
Contributor Author

@mikewalch As far as I can tell, I believe my changes in 52baec5 will also satisfy ACCUMULO-4723

It seemed to run fine with the quick test I ran using: accumulo-testing rw-yarn 1 Bulk.xml

@milleruntime milleruntime changed the title ACCUMULO-4718 Add HADOOP_CONF_DIR to rw-local cp ACCUMULO-4718 Add CLASSPATH to accumulo-testing script Oct 17, 2017
@milleruntime milleruntime merged commit 966bb41 into apache:master Oct 17, 2017
brianloss pushed a commit to brianloss/accumulo-testing that referenced this pull request Feb 9, 2022
…astructure

Update AWS shared_state to gen S3 bucket
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.

3 participants