Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add FS prefix for clarity inside build script

  • Loading branch information...
commit 732c99f6f515fb7fb7d662c93e9656bbdc86da7d 1 parent b225fab
Costin Leau authored
Showing with 16 additions and 4 deletions.
  1. +2 −2 README.md
  2. +14 −2 build.gradle
View
4 README.md
@@ -81,9 +81,9 @@ For its testing, Spring for Apache Hadoop expects a pseudo-distributed/local Had
the project classpath to be automatically used by the Hadoop job tracker. These settings can be customized in two ways:
* Build properties
-From the command-line, use `hd.fs` for the file-system, `hd.jt` for the jobtracker and `hd.hive` for the Hive host/port information, to override the defaults. For example to run against HDFS at `dumbo:8020` one would use:
+From the command-line, use `hd.fs` for the file-system (to avoid confusion, specify the protocol such as 'hdfs://', 's3://', etc - if none is specified, `hdfs://` will be used), `hd.jt` for the jobtracker and `hd.hive` for the Hive host/port information, to override the defaults. For example to run against HDFS at `dumbo:8020` one would use:
- gradlew -Phd.fs=dumbo:8020 build
+ gradlew -Phd.fs=hdfs://dumbo:8020 build
* Properties file
View
16 build.gradle
@@ -224,6 +224,7 @@ test {
systemProperties['output.path'] = 'build/classes/test/output'
includes = ["**/*.class"]
+
doFirst() {
ext.msg = ""
@@ -248,11 +249,22 @@ test {
if (!msg.isEmpty())
println "Skipping [$msg] Tests";
+
+ // check prefix for hd.fs
+ // first copy the properties since we can't change them
+ ext.projProps = project.properties
+
+ if (projProps.containsKey("hd.fs")) {
+ String hdfs = projProps["hd.fs"].toString()
+ if (!hdfs.contains("://")) {
+ projProps.put("hd.fs", "hdfs://" + hdfs)
+ }
+ }
// due to GRADLE-2475, set the system properties manually
- project.properties.each { k,v ->
+ projProps.each { k,v ->
if (k.toString().startsWith("hd.")) {
- systemProperties[k] = project[k]
+ systemProperties[k] = projProps[k]
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.