IP Learning tsg项目 spark版本首次提交
This commit is contained in:
@@ -22,6 +22,10 @@ object UpdateDocument {
|
|||||||
private val LOG = LoggerFactory.getLogger(UpdateDocument.getClass)
|
private val LOG = LoggerFactory.getLogger(UpdateDocument.getClass)
|
||||||
private val baseArangoData = new BaseArangoData()
|
private val baseArangoData = new BaseArangoData()
|
||||||
|
|
||||||
|
def updateDocument(): Unit ={
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
def updateVertexFqdn(): Unit ={
|
def updateVertexFqdn(): Unit ={
|
||||||
baseArangoData.readHistoryData("FQDN",historyVertexFqdnMap,classOf[BaseDocument])
|
baseArangoData.readHistoryData("FQDN",historyVertexFqdnMap,classOf[BaseDocument])
|
||||||
val hisVerFqdnBc = spark.sparkContext.broadcast(historyVertexFqdnMap)
|
val hisVerFqdnBc = spark.sparkContext.broadcast(historyVertexFqdnMap)
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package cn.ac.iie.test;
|
||||||
|
|
||||||
|
public class threadTest implements Runnable {
|
||||||
|
private int count = 10;
|
||||||
|
@Override
|
||||||
|
public /*synchronized*/ void run() {
|
||||||
|
count--;
|
||||||
|
System.out.println(Thread.currentThread().getName() + " count = " + count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
threadTest t = new threadTest();
|
||||||
|
for(int i=0; i<5; i++) {
|
||||||
|
new Thread(t, "THREAD" + i).start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user