Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some small modification #331

Merged
merged 1 commit into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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