@@ -17,7 +17,6 @@ usage() {
1717 echo " --data-dir PATH Directory to store processed data (default: ./)"
1818 echo " --memory SIZE JVM heap size (default: 16g)"
1919 echo " --threads NUM Maximum number of import threads (default: half of CPU cores)"
20- echo " -y, --skip-mem-check Skip memory availability check and warning prompt"
2120 echo " -h, --help Show this help message"
2221 echo " "
2322 echo " Examples:"
@@ -41,7 +40,6 @@ THREADS=""
4140PBF_FILE=" "
4241
4342# Parse arguments
44- SKIP_MEM_CHECK=false
4543while [[ $# -gt 0 ]]; do
4644 case $1 in
4745 --jar-file)
@@ -60,10 +58,6 @@ while [[ $# -gt 0 ]]; do
6058 THREADS=" $2 "
6159 shift 2
6260 ;;
63- -y|--skip-mem-check)
64- SKIP_MEM_CHECK=true
65- shift
66- ;;
6761 -h|--help)
6862 usage
6963 ;;
@@ -135,22 +129,6 @@ REQUESTED_MEM_GB=$(echo "$MEMORY" | sed 's/[^0-9]//g')
135129echo " System memory: ${AVAILABLE_MEM_GB} GB available"
136130echo " Requested heap: $MEMORY "
137131
138- if [ " $SKIP_MEM_CHECK " = false ] && [ " $REQUESTED_MEM_GB " -gt " $AVAILABLE_MEM_GB " ]; then
139- echo " "
140- echo " ⚠️ WARNING: Requested heap size ($MEMORY ) exceeds available memory (${AVAILABLE_MEM_GB} GB)"
141- echo " This may cause the process to be killed by the OOM killer."
142- echo " Consider reducing heap size or adding more RAM."
143- echo " "
144- read -p " Continue anyway? (y/N): " -n 1 -r
145- echo
146- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
147- echo " Import cancelled."
148- exit 1
149- fi
150- elif [ " $SKIP_MEM_CHECK " = true ]; then
151- echo " Skipping memory check (--skip-mem-check flag used)"
152- fi
153-
154132# Build JVM arguments with memory management optimizations
155133JVM_ARGS=" -Xmx$MEMORY -Xms$MEMORY "
156134JVM_ARGS=" $JVM_ARGS -XX:+UseG1GC"
0 commit comments