-
Notifications
You must be signed in to change notification settings - Fork 1
/
globals.hpp
57 lines (39 loc) · 1.82 KB
/
globals.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef GLOBALS
#define GLOBALS
#include <iostream>
#include <sstream>
#include <string>
#include <cstdio>
#include <vector>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include "Event.hpp"
#include "Log.hpp"
std::unordered_set<std::string> java_var_types = {"int", "boolean", "String", "double", "char", "float", "long", "short", "byte"};
/*
protected DatanodeStorageInfo chooseRandom(numOfReplicas...) /////////00000000000000////////////////////////////
int numOfAvailableNodes = clusterMap.countNumOfAvailableNodes(scope, excludedNodes);
while(numOfReplicas > 0 && numOfAvailableNodes > 0) { //////////111111111111111111111111111////////////////
DatanodeDescriptor chosenNode = clusterMap.chooseRandom(scope);
if (excludedNodes.add(chosenNode)) { //was not in the excluded list //////////22222222222222222222//////////////////
numOfAvailableNodes--;
int i;
for(i = 0; i < storages.length; i++) { ///////////////333333333333333333333333333////////////////
final int newExcludedNodes = addIfIsGoodTarget(blkSize);
if (newExcludedNodes >= 0) { //////////////4444444444444444444444/////////////////
numOfReplicas--; /////////////////////////////////555555555555555555555////////////////////////////////////
numOfAvailableNodes -= newExcludedNodes;
break; // break out of for (ID = 3)
}
}
}
}
if (numOfReplicas>0) { //////////////////66666666666666//////////66666666666666666666666////////////////////////////////////////////
throw new NotEnoughReplicasException(detail);
}
return firstChosen;
}
*/
int compare_log_context(Log* A, Log* B){ return compare_one_log(A, B);}
#endif // GLOBALS