Skip to content

Commit

Permalink
fix CI error
Browse files Browse the repository at this point in the history
  • Loading branch information
xubo245 committed Jan 18, 2019
1 parent 2c4bf51 commit 38978cc
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -29,6 +29,7 @@ import org.apache.carbondata.core.constants.CarbonCommonConstants
import org.apache.carbondata.core.util.CarbonProperties

class AlluxioWithExternalTableTest extends AlluxioUtilTest with BeforeAndAfterAll {
var localFile = ""
var remoteFile = ""
var allDataTypeRemote = ""
var allDataTypeLocal = ""
Expand All @@ -46,7 +47,7 @@ class AlluxioWithExternalTableTest extends AlluxioUtilTest with BeforeAndAfterAl
+ "../../../..").getCanonicalPath

val time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())
val localFile = rootPath + "/hadoop/src/test/resources/data.csv"
localFile = rootPath + "/hadoop/src/test/resources/data.csv"
remoteFile = "/carbon_alluxio" + time + ".csv"
fileSystemShell.run("copyFromLocal", localFile, remoteFile)

Expand Down Expand Up @@ -151,6 +152,11 @@ class AlluxioWithExternalTableTest extends AlluxioUtilTest with BeforeAndAfterAl
""".stripMargin)

val path = localAlluxioCluster.getMasterURI + remoteFile

val result = fileSystemShell.run("ls", path)
if (result < 0) {
fileSystemShell.run("copyFromLocal", localFile, remoteFile)
}
sql(s"""LOAD DATA LOCAL INPATH '$path' INTO TABLE $tableNameOriginal""")

fileSystemShell.run("ls", carbonAndAlluxio + "/default")
Expand Down Expand Up @@ -200,6 +206,11 @@ class AlluxioWithExternalTableTest extends AlluxioUtilTest with BeforeAndAfterAl
""".stripMargin)

val path = localAlluxioCluster.getMasterURI + remoteFile

val result = fileSystemShell.run("ls", path)
if (result < 0) {
fileSystemShell.run("copyFromLocal", localFile, remoteFile)
}
sql(s"""LOAD DATA LOCAL INPATH '$path' INTO TABLE $tableNameOriginal""")

fileSystemShell.run("ls", carbonAndAlluxio + "/default")
Expand Down

0 comments on commit 38978cc

Please sign in to comment.