remove piflowbundle configure item
This commit is contained in:
parent
b245a7f6b4
commit
4a36e05c08
|
@ -11,7 +11,7 @@ yarn.resourcemanager.hostname=10.0.86.191
|
|||
#yarn.access.namenode=hdfs://10.0.86.191:9000
|
||||
#yarn.stagingDir=hdfs://10.0.86.191:9000/tmp/
|
||||
#yarn.jars=hdfs://10.0.86.191:9000/user/spark/share/lib/*.jar
|
||||
yarn.url=http://10.0.86.191:8088/ws/v1/cluster/apps/
|
||||
#yarn.url=http://10.0.86.191:8088/ws/v1/cluster/apps/
|
||||
|
||||
|
||||
|
||||
|
@ -31,4 +31,4 @@ monitor.throughput=true
|
|||
h2.port=50001
|
||||
|
||||
|
||||
piflow.bundle=piflow-server/target/piflow-server-0.9.jar
|
||||
#piflow.bundle=piflow-server/target/piflow-server-0.9.jar
|
|
@ -1,8 +1,10 @@
|
|||
package cn.piflow.util
|
||||
|
||||
import java.io.{FileInputStream, InputStream}
|
||||
import java.io.{File, FileInputStream, InputStream}
|
||||
import java.util.Properties
|
||||
|
||||
import cn.piflow.util.FileUtil.getJarFile
|
||||
|
||||
object ConfigureUtil {
|
||||
|
||||
val NOT_EXIST_FLAG = 0
|
||||
|
@ -60,14 +62,39 @@ object ConfigureUtil {
|
|||
}
|
||||
|
||||
def getPiFlowBundlePath():String = {
|
||||
var piflowBundleList = List[String]()
|
||||
val userDir = System.getProperty("user.dir")
|
||||
var piflowBundlePath = PropertyUtil.getPropertyValue("piflow.bundle")
|
||||
if(piflowBundlePath == null){
|
||||
piflowBundlePath = userDir + "/lib/piflow-server-0.9.jar"
|
||||
val path = new File(userDir)
|
||||
getJarFile(path).foreach(x => {
|
||||
|
||||
if(x.getName == "piflow-server-0.9.jar")
|
||||
piflowBundleList = x.getAbsolutePath +: piflowBundleList
|
||||
|
||||
})
|
||||
|
||||
var piflowBundleJar = ""
|
||||
if(piflowBundleList.size > 0){
|
||||
piflowBundleJar = piflowBundleList(0)
|
||||
|
||||
piflowBundleList.foreach( jarFile => {
|
||||
if(jarFile.contains("classpath")){
|
||||
piflowBundleJar = jarFile
|
||||
println(piflowBundleJar)
|
||||
return piflowBundleJar
|
||||
}
|
||||
})
|
||||
|
||||
piflowBundleList.foreach( jarFile => {
|
||||
if(jarFile.contains("piflow-server/target")){
|
||||
piflowBundleJar = jarFile
|
||||
println(piflowBundleJar)
|
||||
return piflowBundleJar
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
else
|
||||
piflowBundlePath = userDir + "/" + piflowBundlePath
|
||||
piflowBundlePath
|
||||
println(piflowBundleJar)
|
||||
piflowBundleJar
|
||||
}
|
||||
|
||||
def getYarnResourceManagerWebAppAddress() : String = {
|
||||
|
@ -84,7 +111,8 @@ object ConfigureUtil {
|
|||
}
|
||||
|
||||
def main(args: Array[String]): Unit = {
|
||||
val temp = getYarnResourceManagerWebAppAddress()
|
||||
val temp = getPiFlowBundlePath()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue