Skip to content

Commit

Permalink
Some small modification
Browse files Browse the repository at this point in the history
Change-Id: I80ff7c0778e52b4ca939f42c7a4e111da5b09406
  • Loading branch information
Linary authored and zhoney committed Jan 14, 2019
1 parent 1885132 commit 0e63594
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public final class DateUtil {
"yyyy-MM-dd",
"^\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{2}:\\d{2}:\\d{2}",
"yyyy-MM-dd HH:mm:ss",
"^\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{2}:\\d{2}:\\d{2}\\.\\d{3}",
"^\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{2}:\\d{2}:\\d{2}\\.\\d{1,3}",
"yyyy-MM-dd HH:mm:ss.SSS"
);

Expand Down
6 changes: 3 additions & 3 deletions hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ else
fi

PID="$!"
# Write pid to file
echo "$PID" > $PID_FILE

trap 'kill $PID; exit' SIGHUP SIGINT SIGQUIT SIGTERM

wait_for_startup 'HugeGraphServer' "$REST_SERVER_URL/graphs" $SERVER_STARTUP_TIMEOUT_S || {
Expand All @@ -61,9 +64,6 @@ wait_for_startup 'HugeGraphServer' "$REST_SERVER_URL/graphs" $SERVER_STARTUP_TIM
}
disown

# Write pid to file
echo "$PID" > $PID_FILE

if [ "$OPEN_MONITOR" == "true" ]; then
$BIN/start-monitor.sh
if [ $? -ne 0 ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ public static void load(final HugeGraph graph) {
.ifNotExist()
.create();

schema.indexLabel("personByName")
.onV("person")
.by("name")
.secondary()
.ifNotExist()
.create();

schema.indexLabel("personByCity")
.onV("person")
.by("city")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ protected static void clearGraph() {
throw new HugeException("Failed to list " + type);
}
String content = r.readEntity(String.class);
@SuppressWarnings("rawtypes")
List<Map> list = readList(content, type, Map.class);
List<Object> ids = list.stream().map(e -> e.get("id"))
.collect(Collectors.toList());
Expand All @@ -359,6 +360,7 @@ protected static void clearSchema() {
throw new HugeException("Failed to list " + type);
}
String content = r.readEntity(String.class);
@SuppressWarnings("rawtypes")
List<Map> list = readList(content, type, Map.class);
List<Object> names = list.stream().map(e -> e.get("name"))
.collect(Collectors.toList());
Expand Down

0 comments on commit 0e63594

Please sign in to comment.