You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by GitBox <gi...@apache.org> on 2020/10/25 22:22:29 UTC

[GitHub] [gora] jhnmora000 commented on a change in pull request #225: GORA-562 Add bin batchscript

jhnmora000 commented on a change in pull request #225:
URL: https://github.com/apache/gora/pull/225#discussion_r511656023



##########
File path: bin/gora.bat
##########
@@ -0,0 +1,177 @@
+:: Licensed to the Apache Software Foundation (ASF) under one or more
+:: contributor license agreements.  See the NOTICE file distributed with
+:: this work for additional information regarding copyright ownership.
+:: The ASF licenses this file to You under the Apache License, Version 2.0
+:: (the "License"); you may not use this file except in compliance with
+:: the License.  You may obtain a copy of the License at
+:: 
+::     http://www.apache.org/licenses/LICENSE-2.0
+:: 
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+
+::
+:: The script to run Java components.
+::
+:: Environment Variables
+::
+::   GORA_HEAPSIZE  The maximum amount of heap to use, in MB. 
+::                   Default is 1024.
+::
+::   GORA_OPTS      Extra Java runtime option.
+::
+
+:: resolve links - %0 may be a softlink
+@echo off
+setlocal enabledelayedexpansion
+set THIS=%~f0
+
+::if no args specified, show usage
+if "%~1" == "" (GOTO ECHOOPTIONS) else (GOTO HAVEARGUMENTS)
+
+:ECHOOPTIONS
+@echo Usage: run COMMAND [COMMAND options]
+@echo where COMMAND is one of:
+@echo   goracompiler               Run Compiler
+@echo   specificcompiler           Run Avro Specific Compiler
+@echo   cassandranativecompiler    Run Gora Cassandra Native Compiler
+@echo   dynamocompiler             Run Gora DynamoDB Compiler
+@echo   goracirackspace            Run the GoraCI Rackspace orchestration setup
+@echo   goracichef                 Run the GoraCI Chef software provisioning setup
+@echo   logmanager                 Run the tutorial log manager
+@echo   distributedlogmanager      Run the tutorial distributed log manager
+@echo   loganalytics               Run the tutorial log analytics
+@echo   loganalyticsspark          Run the tutorial log analytics spark
+@echo   junit                      Run the given JUnit test
+@echo   version                    Print Gora version to terminal
+@echo  or
+@echo  MODULE CLASSNAME   run the class named CLASSNAME in module MODULE
+@echo Most commands print help when invoked w/o parameters.
+exit /B 1
+
+:HAVEARGUMENTS
+set COMMAND=%1
+shift
+
+for %%F in (%THIS%) do set THIS_DIR=%%~dpF
+for %%F IN ("%THIS_DIR:~0,-1%") DO set GORA_HOME=%%~dpF
+if exist "%GORA_HOME%conf\gora-env.sh" CALL "%GORA_HOME%conf\gora-env.sh"

Review comment:
       You can assume that the gora-env will have the '.bat' extension on Windows.

##########
File path: bin/gora.bat
##########
@@ -0,0 +1,177 @@
+:: Licensed to the Apache Software Foundation (ASF) under one or more
+:: contributor license agreements.  See the NOTICE file distributed with
+:: this work for additional information regarding copyright ownership.
+:: The ASF licenses this file to You under the Apache License, Version 2.0
+:: (the "License"); you may not use this file except in compliance with
+:: the License.  You may obtain a copy of the License at
+:: 
+::     http://www.apache.org/licenses/LICENSE-2.0
+:: 
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+
+::
+:: The script to run Java components.
+::
+:: Environment Variables
+::
+::   GORA_HEAPSIZE  The maximum amount of heap to use, in MB. 
+::                   Default is 1024.
+::
+::   GORA_OPTS      Extra Java runtime option.
+::
+
+:: resolve links - %0 may be a softlink
+@echo off
+setlocal enabledelayedexpansion
+set THIS=%~f0
+
+::if no args specified, show usage
+if "%~1" == "" (GOTO ECHOOPTIONS) else (GOTO HAVEARGUMENTS)
+
+:ECHOOPTIONS
+@echo Usage: run COMMAND [COMMAND options]
+@echo where COMMAND is one of:
+@echo   goracompiler               Run Compiler
+@echo   specificcompiler           Run Avro Specific Compiler
+@echo   cassandranativecompiler    Run Gora Cassandra Native Compiler
+@echo   dynamocompiler             Run Gora DynamoDB Compiler
+@echo   goracirackspace            Run the GoraCI Rackspace orchestration setup
+@echo   goracichef                 Run the GoraCI Chef software provisioning setup
+@echo   logmanager                 Run the tutorial log manager
+@echo   distributedlogmanager      Run the tutorial distributed log manager
+@echo   loganalytics               Run the tutorial log analytics
+@echo   loganalyticsspark          Run the tutorial log analytics spark
+@echo   junit                      Run the given JUnit test
+@echo   version                    Print Gora version to terminal

Review comment:
       I got this error when I tried: 
   **C:\Users\user\source\gora-bin-batchscript\bin**>gora.bat version
   The input line is too long.
   The syntax of the command is incorrect.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org