apache ignite cli

master
parent fb7eb065b0
commit 31d88420cb
  1. 304
      tpch/apache-ignite-2.11.0-bin/LICENSE
  2. 2
      tpch/apache-ignite-2.11.0-bin/MIGRATION_GUIDE.txt
  3. 13
      tpch/apache-ignite-2.11.0-bin/NOTICE
  4. 68
      tpch/apache-ignite-2.11.0-bin/README.txt
  5. 1909
      tpch/apache-ignite-2.11.0-bin/RELEASE_NOTES.txt
  6. 257
      tpch/apache-ignite-2.11.0-bin/bin/control.bat
  7. 185
      tpch/apache-ignite-2.11.0-bin/bin/control.sh
  8. 261
      tpch/apache-ignite-2.11.0-bin/bin/ignite.bat
  9. 212
      tpch/apache-ignite-2.11.0-bin/bin/ignite.sh
  10. 35
      tpch/apache-ignite-2.11.0-bin/bin/igniterouter.bat
  11. 53
      tpch/apache-ignite-2.11.0-bin/bin/igniterouter.sh
  12. 202
      tpch/apache-ignite-2.11.0-bin/bin/ignitevisorcmd.bat
  13. 170
      tpch/apache-ignite-2.11.0-bin/bin/ignitevisorcmd.sh
  14. 144
      tpch/apache-ignite-2.11.0-bin/bin/include/functions.sh
  15. 202
      tpch/apache-ignite-2.11.0-bin/bin/include/licenses/apache-2.0.txt
  16. 66
      tpch/apache-ignite-2.11.0-bin/bin/include/licenses/ignite-spring-licenses.txt
  17. 12
      tpch/apache-ignite-2.11.0-bin/bin/include/licenses/ignite-sqlline-licenses.txt
  18. 18
      tpch/apache-ignite-2.11.0-bin/bin/include/licenses/ignite-ssh-licenses.txt
  19. 60
      tpch/apache-ignite-2.11.0-bin/bin/include/licenses/ignite-visor-console-licenses.txt
  20. 52
      tpch/apache-ignite-2.11.0-bin/bin/include/parseargs.bat
  21. 69
      tpch/apache-ignite-2.11.0-bin/bin/include/parseargs.sh
  22. 56
      tpch/apache-ignite-2.11.0-bin/bin/include/setenv.bat
  23. 82
      tpch/apache-ignite-2.11.0-bin/bin/include/setenv.sh
  24. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jansi-1.18.jar
  25. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jline-builtins-3.12.1.jar
  26. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jline-reader-3.12.1.jar
  27. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jline-style-3.12.1.jar
  28. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jline-terminal-3.12.1.jar
  29. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jline-terminal-jansi-3.12.1.jar
  30. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jline-terminal-jna-3.12.1.jar
  31. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/jna-5.3.1.jar
  32. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/sqlline/sqlline-1.9.0.jar
  33. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/commons-logging-1.1.1.jar
  34. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/ignite-spring-2.11.0.jar
  35. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/ignite-ssh-2.11.0.jar
  36. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/jsch-0.1.54.jar
  37. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/scala-library-2.11.12.jar
  38. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/spring-aop-4.3.26.RELEASE.jar
  39. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/spring-beans-4.3.26.RELEASE.jar
  40. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/spring-context-4.3.26.RELEASE.jar
  41. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/spring-core-4.3.26.RELEASE.jar
  42. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/spring-expression-4.3.26.RELEASE.jar
  43. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visor-common/spring-tx-4.3.26.RELEASE.jar
  44. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visorcmd/ignite-visor-console-2.11.0.jar
  45. BIN
      tpch/apache-ignite-2.11.0-bin/bin/include/visorcmd/jline-2.12.1.jar
  46. 150
      tpch/apache-ignite-2.11.0-bin/bin/sqlline.bat
  47. 118
      tpch/apache-ignite-2.11.0-bin/bin/sqlline.sh
  48. 129
      tpch/apache-ignite-2.11.0-bin/libs/README.txt
  49. BIN
      tpch/apache-ignite-2.11.0-bin/libs/ignite-core-2.11.0.jar

@ -0,0 +1,304 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.
==============================================================================
Apache Ignite Subcomponents:
The Apache Ignite project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for the these
subcomponents is subject to the terms and conditions of the following
licenses.
==============================================================================
For SnapTree:
==============================================================================
This product bundles SnapTree, which is available under the following:
"3-clause BSD" license. For details, see https://github.com/nbronson/snaptree/blob/master/LICENSE.
==============================================================================
For JSR 166 classes in "org.jsr166" package
==============================================================================
This product bundles JSR-166 classes which are donated to public domain.
For details, see CC0 1.0 Universal (1.0), Public Domain Dedication,
http://creativecommons.org/publicdomain/zero/1.0/
==============================================================================
For JSR107 API and SPI (https://github.com/jsr107/jsr107spec) javax.cache:cache-api:jar:1.0.0
==============================================================================
This product bundles JSR107 API and SPI which is available under the following:
JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt
==============================================================================
For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.50
==============================================================================
This product bundles JSch which is available under the following:
Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
==============================================================================
For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
==============================================================================
This product bundles JLine which is available under the following:
The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
==============================================================================
For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.*
==============================================================================
This product bundles Scala Library which is available under the following:
BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
==============================================================================
For H2 Database Engine (http://www.h2database.com) com.h2database:h2:jar:1.4.191
==============================================================================
This product bundles H2 Database Engine which is available under the following:
MPL 2.0, and EPL 1.0. For details, see http://h2database.com/html/license.html.
==============================================================================
For JTidy (http://jtidy.sourceforge.net) net.sf.jtidy:jtidy:jar:r938
==============================================================================
This product bundles JTidy which is available under the following:
Java HTML Tidy License. For details, see http://jtidy.svn.sourceforge.net/viewvc/jtidy/trunk/jtidy/LICENSE.txt?revision=95.
==============================================================================
For tomcat-servlet-api (http://tomcat.apache.org/) org.apache.tomcat:tomcat-servlet-api:jar:9.0.10
==============================================================================
This product bundles tomcat-servlet-api which is available under the following:
Apache License, Version 2.0 and Common Development And Distribution License (CDDL) Version 1.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt and http://www.opensource.org/licenses/cddl1.txt.
==============================================================================
For AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
==============================================================================
This product bundles AOP alliance which is available under the following:
Public Domain.
==============================================================================
For AspectJ (http://www.aspectj.org) org.aspectj:*:jar:1.7.2
==============================================================================
This product bundles AspectJ which is available under the following:
Eclipse Public License - v 1.0. For details, see http://www.eclipse.org/legal/epl-v10.html.
==============================================================================
For Java Transaction API (http://java.sun.com/products/jta) javax.transaction:jta:jar:1.1
==============================================================================
This product bundles Java Transaction API which is available under it's own license.
See http://download.oracle.com/otndocs/jcp/jta-1.1-classes-oth-JSpec/jta-1.1-classes-oth-JSpec-license.html for details.
==============================================================================
For ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:5.0.3
==============================================================================
This product bundles ASM All which is available under the following:
BSD. For details, see http://asm.objectweb.org/license.html.
==============================================================================
For Jetty (http://www.eclipse.org/jetty) org.eclipse.jetty:*:jar:9.2.11.v20150529
==============================================================================
This product bundles Jetty which is available under the following:
Apache Software License - Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.
Eclipse Public License - Version 1.0. For details, see http://www.eclipse.org/org/documents/epl-v10.php.
==============================================================================
For SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4
==============================================================================
This product bundles SLF4J API Module which is available under the following:
MIT License. For details, see http://www.opensource.org/licenses/mit-license.php.

@ -0,0 +1,2 @@
Apache Ignite Migration Guide
===========================

@ -0,0 +1,13 @@
Apache Ignite
Copyright 2021 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This software includes code from IntelliJ IDEA Community Edition
Copyright (C) JetBrains s.r.o.
https://www.jetbrains.com/idea/
Licensed under Apache License, Version 2.0.
http://search.maven.org/#artifactdetails%7Corg.jetbrains%7Cannotations%7C13.0%7Cjar

@ -0,0 +1,68 @@
Apache Ignite In-Memory Database and Caching Platform
=====================================================
Ignite is a memory-centric distributed database, caching, and processing platform for transactional, analytical,
and streaming workloads delivering in-memory speeds at petabyte scale.
The main feature set of Ignite includes:
* Memory-Centric Storage
* Advanced Clustering
* Distributed Key-Value
* Distributed SQL
* Compute Grid
* Service Grid
* Distributed Data Structures
* Distributed Messaging
* Distributed Events
* Streaming & CEP
For information on how to get started with Apache Ignite please visit:
https://ignite.apache.org/docs/latest/
Crypto Notice
=============
This distribution includes cryptographic software. The country in
which you currently reside may have restrictions on the import, possession,
use, and/or re-export to another country, of encryption software.
BEFORE using any encryption software, please check your country's laws,
regulations and policies concerning the import, possession, or use,
and re-export of encryption software, to see if this is permitted.
See http://www.wassenaar.org/ for more information.
The Apache Software Foundation has classified this software as Export
Commodity Control Number (ECCN) 5D002, which includes information
security software using or performing cryptographic functions with
asymmetric algorithms. The form and manner of this Apache Software
Foundation distribution makes it eligible for export under the
"publicly available" Section 742.15(b) exemption (see the BIS Export
Administration Regulations, Section 742.15(b)) for both object code
and source code.
The following provides more details on the included cryptographic software:
* JDK SSL/TLS libraries used to enable secured connectivity between cluster
nodes (https://ignite.apache.org/docs/latest/security/ssl-tls).
Oracle/OpenJDK (https://www.oracle.com/technetwork/java/javase/downloads/index.html)
* JDK Java Cryptography Extensions build in encryption from the Java libraries is used
for Transparent Data Encryption of data on disk
(https://ignite.apache.org/docs/latest/security/tde)
and for AWS S3 Client Side Encryprion.
(https://java.sun.com/javase/technologies/security/)
* C++ thin client and ODBC use OpenSSL to establish secure connection with the cluster.
The OpenSSL Project (https://www.openssl.org/)
* Apache Ignite SSH module requires the JSch library. This provides capabilities to
start Apache Ignite nodes on remote machines via SSH.
JCraft (http://www.jcraft.com/jsch/)
* Apache Ignite REST http module requires Jetty, and this module can use HTTPs (uses SSL).
Eclipse Jetty (http://eclipse.org/jetty)
* Apache Ignite.NET uses .NET Framework crypto APIs from standard class library
for all security and cryptographic related code.
.NET Classic, Windows-only (https://dotnet.microsoft.com/download)
.NET Core (https://dotnetfoundation.org/projects)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,257 @@
::
:: 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.
::
::
:: Grid command line loader.
::
@echo off
Setlocal EnableDelayedExpansion
if "%OS%" == "Windows_NT" setlocal
:: Check JAVA_HOME.
if defined JAVA_HOME goto checkJdk
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
echo Please point JAVA_HOME variable to location of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdk
:: Check that JDK is where it should be.
if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
echo %0, ERROR:
echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdkVersion
set cmd="%JAVA_HOME%\bin\java.exe"
for /f "tokens=* USEBACKQ" %%f in (`%cmd% -version 2^>^&1`) do (
set var=%%f
goto :LoopEscape
)
:LoopEscape
for /f "tokens=1-3 delims= " %%a in ("%var%") do set JAVA_VER_STR=%%c
set JAVA_VER_STR=%JAVA_VER_STR:"=%
for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set MAJOR_JAVA_VER=%%a& set MINOR_JAVA_VER=%%b
if %MAJOR_JAVA_VER% == 1 set MAJOR_JAVA_VER=%MINOR_JAVA_VER%
if %MAJOR_JAVA_VER% LSS 8 (
echo %0, ERROR:
echo The version of JAVA installed in %JAVA_HOME% is incorrect.
echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
)
:: Check IGNITE_HOME.
:checkIgniteHome1
if defined IGNITE_HOME goto checkIgniteHome2
pushd "%~dp0"/..
set IGNITE_HOME=%CD%
popd
:checkIgniteHome2
:: Strip double quotes from IGNITE_HOME
set IGNITE_HOME=%IGNITE_HOME:"=%
:: remove all trailing slashes from IGNITE_HOME.
if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
goto checkIgniteHome3
:removeTrailingSlash
set IGNITE_HOME=%IGNITE_HOME:~0,-1%
goto checkIgniteHome2
:checkIgniteHome3
if exist "%IGNITE_HOME%\config" goto checkIgniteHome4
echo %0, ERROR: Ignite installation folder is not found or IGNITE_HOME environment variable is not valid.
echo Please create IGNITE_HOME environment variable pointing to location of
echo Ignite installation folder.
goto error_finish
:checkIgniteHome4
::
:: Set SCRIPTS_HOME - base path to scripts.
::
set SCRIPTS_HOME=%IGNITE_HOME%\bin
:: Remove trailing spaces
for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
if /i "%SCRIPTS_HOME%\" == "%~dp0" goto setProgName
echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
:setProgName
::
:: Set program name.
::
set PROG_NAME=ignite.bat
if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:run
::
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
set CP=%IGNITE_LIBS%;%IGNITE_HOME%\libs\optional\ignite-zookeeper\*
::
:: Process 'restart'.
::
set RANDOM_NUMBER_COMMAND="!JAVA_HOME!\bin\java.exe" -cp %CP% org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator
for /f "usebackq tokens=*" %%i in (`!RANDOM_NUMBER_COMMAND!`) do set RANDOM_NUMBER=%%i
set RESTART_SUCCESS_FILE="%IGNITE_HOME%\work\ignite_success_%RANDOM_NUMBER%"
set RESTART_SUCCESS_OPT=-DIGNITE_SUCCESS_FILE=%RESTART_SUCCESS_FILE%
::
:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
::
:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
::
"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[7]\." > nul
if %ERRORLEVEL% equ 0 (
if "%CONTROL_JVM_OPTS%" == "" set CONTROL_JVM_OPTS=-Xms256m -Xmx1g
) else (
if "%CONTROL_JVM_OPTS%" == "" set CONTROL_JVM_OPTS=-Xms256m -Xmx1g
)
::
:: Uncomment to enable experimental commands [--wal]
::
:: set CONTROL_JVM_OPTS=%CONTROL_JVM_OPTS% -DIGNITE_ENABLE_EXPERIMENTAL_COMMAND=true
::
:: Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
::
:: set CONTROL_JVM_OPTS=%CONTROL_JVM_OPTS% -XX:+UseG1GC
::
:: Uncomment if you get StackOverflowError.
:: On 64 bit systems this value can be larger, e.g. -Xss16m
::
:: set CONTROL_JVM_OPTS=%CONTROL_JVM_OPTS% -Xss4m
::
:: Uncomment to set preference to IPv4 stack.
::
:: set CONTROL_JVM_OPTS=%CONTROL_JVM_OPTS% -Djava.net.preferIPv4Stack=true
::
:: Assertions are disabled by default since version 3.5.
:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
::
set ENABLE_ASSERTIONS=0
::
:: Set '-ea' options if assertions are enabled.
::
if %ENABLE_ASSERTIONS% == 1 set CONTROL_JVM_OPTS=%CONTROL_JVM_OPTS% -ea
:run_java
::
:: Set main class to start service (grid node by default).
::
if "%MAIN_CLASS%" == "" set MAIN_CLASS=org.apache.ignite.internal.commandline.CommandHandler
::
:: Remote debugging (JPDA).
:: Uncomment and change if remote debugging is required.
:: set CONTROL_JVM_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787 %CONTROL_JVM_OPTS%
::
::
:: Final CONTROL_JVM_OPTS for Java 9+ compatibility
::
if %MAJOR_JAVA_VER% == 8 (
set CONTROL_JVM_OPTS= ^
-XX:+AggressiveOpts ^
%CONTROL_JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 9 if %MAJOR_JAVA_VER% LSS 11 (
set CONTROL_JVM_OPTS= ^
-XX:+AggressiveOpts ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--illegal-access=permit ^
--add-modules=java.xml.bind ^
%CONTROL_JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 11 (
set CONTROL_JVM_OPTS= ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED ^
--illegal-access=permit ^
%CONTROL_JVM_OPTS%
)
if defined JVM_OPTS (
echo JVM_OPTS environment variable is set, but will not be used. To pass JVM options use CONTROL_JVM_OPTS
echo JVM_OPTS=%JVM_OPTS%
)
if "%INTERACTIVE%" == "1" (
"%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS% %*
) else (
"%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS% %*
)
set JAVA_ERRORLEVEL=%ERRORLEVEL%
:: errorlevel 130 if aborted with Ctrl+c
if %JAVA_ERRORLEVEL%==130 goto finish
:: Exit if first run unsuccessful (Loader must create file).
if not exist %RESTART_SUCCESS_FILE% goto error_finish
del %RESTART_SUCCESS_FILE%
goto run_java
:finish
if not exist %RESTART_SUCCESS_FILE% goto error_finish
del %RESTART_SUCCESS_FILE%
:error_finish
if not "%NO_PAUSE%" == "1" pause
goto :eof

@ -0,0 +1,185 @@
#!/usr/bin/env bash
if [ ! -z "${IGNITE_SCRIPT_STRICT_MODE:-}" ]
then
set -o nounset
set -o errexit
set -o pipefail
set -o errtrace
set -o functrace
fi
#
# 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.
#
#
# Grid cluster control.
#
#
# Import common functions.
#
if [ "${IGNITE_HOME:-}" = "" ];
then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
else IGNITE_HOME_TMP=${IGNITE_HOME};
fi
#
# Set SCRIPTS_HOME - base path to scripts.
#
SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
source "${SCRIPTS_HOME}"/include/functions.sh
#
# Discover path to Java executable and check it's version.
#
checkJava
#
# Discover IGNITE_HOME environment variable.
#
setIgniteHome
if [ "${DEFAULT_CONFIG:-}" == "" ]; then
DEFAULT_CONFIG=config/default-config.xml
fi
#
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
CP="${IGNITE_LIBS}:${IGNITE_HOME}/libs/optional/ignite-zookeeper/*"
RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
# Mac OS specific support to display correct name in the dock.
osname=`uname`
if [ "${DOCK_OPTS:-}" == "" ]; then
DOCK_OPTS="-Xdock:name=Ignite Node"
fi
#
# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
#
# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
#
if [ -z "${CONTROL_JVM_OPTS:-}" ] ; then
if [[ `"$JAVA" -version 2>&1 | egrep "1\.[7]\."` ]]; then
CONTROL_JVM_OPTS="-Xms256m -Xmx1g"
else
CONTROL_JVM_OPTS="-Xms256m -Xmx1g"
fi
fi
#
# Uncomment to enable experimental commands [--wal]
#
# CONTROL_JVM_OPTS="${CONTROL_JVM_OPTS} -DIGNITE_ENABLE_EXPERIMENTAL_COMMAND=true"
#
# Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
#
# CONTROL_JVM_OPTS="$CONTROL_JVM_OPTS -XX:+UseG1GC"
#
# Uncomment if you get StackOverflowError.
# On 64 bit systems this value can be larger, e.g. -Xss16m
#
# CONTROL_JVM_OPTS="${CONTROL_JVM_OPTS} -Xss4m"
#
# Uncomment to set preference for IPv4 stack.
#
# CONTROL_JVM_OPTS="${CONTROL_JVM_OPTS} -Djava.net.preferIPv4Stack=true"
#
# Assertions are disabled by default since version 3.5.
# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
#
ENABLE_ASSERTIONS="0"
#
# Set '-ea' options if assertions are enabled.
#
if [ "${ENABLE_ASSERTIONS:-}" = "1" ]; then
CONTROL_JVM_OPTS="${CONTROL_JVM_OPTS} -ea"
fi
#
# Set main class to start service (grid node by default).
#
if [ "${MAIN_CLASS:-}" = "" ]; then
MAIN_CLASS=org.apache.ignite.internal.commandline.CommandHandler
fi
#
# Remote debugging (JPDA).
# Uncomment and change if remote debugging is required.
#
# CONTROL_JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787 ${CONTROL_JVM_OPTS}"
#
# Final CONTROL_JVM_OPTS for Java 9+ compatibility
#
if [ $version -eq 8 ] ; then
CONTROL_JVM_OPTS="\
-XX:+AggressiveOpts \
${CONTROL_JVM_OPTS}"
elif [ $version -gt 8 ] && [ $version -lt 11 ]; then
CONTROL_JVM_OPTS="\
-XX:+AggressiveOpts \
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--illegal-access=permit \
--add-modules=java.xml.bind \
${CONTROL_JVM_OPTS}"
elif [ $version -ge 11 ] ; then
CONTROL_JVM_OPTS="\
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
--illegal-access=permit \
${CONTROL_JVM_OPTS}"
fi
if [ -n "${JVM_OPTS}" ] ; then
echo "JVM_OPTS environment variable is set, but will not be used. To pass JVM options use CONTROL_JVM_OPTS"
echo "JVM_OPTS=${JVM_OPTS}"
fi
case $osname in
Darwin*)
"$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} "${DOCK_OPTS}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
;;
*)
"$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
;;
esac

@ -0,0 +1,261 @@
::
:: 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.
::
::
:: Grid command line loader.
::
@echo off
Setlocal EnableDelayedExpansion
if "%OS%" == "Windows_NT" setlocal
:: Check JAVA_HOME.
if defined JAVA_HOME goto checkJdk
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
echo Please point JAVA_HOME variable to location of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdk
:: Check that JDK is where it should be.
if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
echo %0, ERROR:
echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdkVersion
set cmd="%JAVA_HOME%\bin\java.exe"
for /f "tokens=* USEBACKQ" %%f in (`%cmd% -version 2^>^&1`) do (
set var=%%f
goto :LoopEscape
)
:LoopEscape
for /f "tokens=1-3 delims= " %%a in ("%var%") do set JAVA_VER_STR=%%c
set JAVA_VER_STR=%JAVA_VER_STR:"=%
for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set MAJOR_JAVA_VER=%%a& set MINOR_JAVA_VER=%%b
if %MAJOR_JAVA_VER% == 1 set MAJOR_JAVA_VER=%MINOR_JAVA_VER%
if %MAJOR_JAVA_VER% LSS 8 (
echo %0, ERROR:
echo The version of JAVA installed in %JAVA_HOME% is incorrect.
echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
)
:: Check IGNITE_HOME.
:checkIgniteHome1
if defined IGNITE_HOME goto checkIgniteHome2
pushd "%~dp0"/..
set IGNITE_HOME=%CD%
popd
:checkIgniteHome2
:: Strip double quotes from IGNITE_HOME
set IGNITE_HOME=%IGNITE_HOME:"=%
:: remove all trailing slashes from IGNITE_HOME.
if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
goto checkIgniteHome3
:removeTrailingSlash
set IGNITE_HOME=%IGNITE_HOME:~0,-1%
goto checkIgniteHome2
:checkIgniteHome3
if exist "%IGNITE_HOME%\config" goto checkIgniteHome4
echo %0, ERROR: Ignite installation folder is not found or IGNITE_HOME environment variable is not valid.
echo Please create IGNITE_HOME environment variable pointing to location of
echo Ignite installation folder.
goto error_finish
:checkIgniteHome4
::
:: Set SCRIPTS_HOME - base path to scripts.
::
set SCRIPTS_HOME=%IGNITE_HOME%\bin
:: Remove trailing spaces
for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
if /i "%SCRIPTS_HOME%\" == "%~dp0" goto setProgName
echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
:setProgName
::
:: Set program name.
::
set PROG_NAME=ignite.bat
if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:run
::
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
set CP=%IGNITE_LIBS%
::
:: Parse command line parameters.
::
if not defined DEFAULT_CONFIG set "DEFAULT_CONFIG=config\default-config.xml"
call "%SCRIPTS_HOME%\include\parseargs.bat" %*
if %ERRORLEVEL% neq 0 (
echo Arguments parsing failed
exit /b %ERRORLEVEL%
)
::
:: Process 'restart'.
::
set RANDOM_NUMBER_COMMAND="!JAVA_HOME!\bin\java.exe" -cp "%CP%" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator
for /f "usebackq tokens=*" %%i in (`"!RANDOM_NUMBER_COMMAND!"`) do set RANDOM_NUMBER=%%i
set RESTART_SUCCESS_FILE="%IGNITE_HOME%\work\ignite_success_%RANDOM_NUMBER%"
set RESTART_SUCCESS_OPT=-DIGNITE_SUCCESS_FILE=%RESTART_SUCCESS_FILE%
::
:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
::
:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
::
"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[7]\." > nul
if %ERRORLEVEL% equ 0 (
if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:MaxPermSize=256m
) else (
if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:MaxMetaspaceSize=256m
)
::
:: Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
::
:: set JVM_OPTS=%JVM_OPTS% -XX:+UseG1GC
::
:: Uncomment if you get StackOverflowError.
:: On 64 bit systems this value can be larger, e.g. -Xss16m
::
:: set JVM_OPTS=%JVM_OPTS% -Xss4m
::
:: Uncomment to set preference to IPv4 stack.
::
:: set JVM_OPTS=%JVM_OPTS% -Djava.net.preferIPv4Stack=true
::
:: Uncomment to enable reverse DNS lookup.
::
:: set JVM_OPTS=%JVM_OPTS% -Dsun.net.spi.nameservice.provider.1=default -Dsun.net.spi.nameservice.provider.2=dns,sun
::
:: Assertions are disabled by default since version 3.5.
:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
::
set ENABLE_ASSERTIONS=0
::
:: Set '-ea' options if assertions are enabled.
::
if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS=%JVM_OPTS% -ea
:run_java
::
:: Set main class to start service (grid node by default).
::
if "%MAIN_CLASS%" == "" set MAIN_CLASS=org.apache.ignite.startup.cmdline.CommandLineStartup
::
:: Remote debugging (JPDA).
:: Uncomment and change if remote debugging is required.
:: set JVM_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787 %JVM_OPTS%
::
::
:: Final JVM_OPTS for Java 9+ compatibility
::
if %MAJOR_JAVA_VER% == 8 (
set JVM_OPTS= ^
-XX:+AggressiveOpts ^
%JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 9 if %MAJOR_JAVA_VER% LSS 11 (
set JVM_OPTS= ^
-XX:+AggressiveOpts ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--illegal-access=permit ^
--add-modules=java.xml.bind ^
%JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 11 (
set JVM_OPTS= ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED ^
--illegal-access=permit ^
%JVM_OPTS%
)
if "%INTERACTIVE%" == "1" (
"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS%
) else (
"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS% "%CONFIG%"
)
set JAVA_ERRORLEVEL=%ERRORLEVEL%
:: errorlevel 130 if aborted with Ctrl+c
if %JAVA_ERRORLEVEL%==130 goto finish
:: Exit if first run unsuccessful (Loader must create file).
if not exist %RESTART_SUCCESS_FILE% goto error_finish
del %RESTART_SUCCESS_FILE%
goto run_java
:finish
if not exist %RESTART_SUCCESS_FILE% goto error_finish
del %RESTART_SUCCESS_FILE%
:error_finish
if not "%NO_PAUSE%" == "1" pause
goto :eof

@ -0,0 +1,212 @@
#!/usr/bin/env bash
if [ ! -z "${IGNITE_SCRIPT_STRICT_MODE:-}" ]
then
set -o nounset
set -o errexit
set -o pipefail
set -o errtrace
set -o functrace
fi
#
# 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.
#
#
# Grid command line loader.
#
#
# Import common functions.
#
if [ "${IGNITE_HOME:-}" = "" ];
then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
else IGNITE_HOME_TMP=${IGNITE_HOME};
fi
#
# Set SCRIPTS_HOME - base path to scripts.
#
SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
source "${SCRIPTS_HOME}"/include/functions.sh
#
# Discover path to Java executable and check it's version.
#
checkJava
#
# Discover IGNITE_HOME environment variable.
#
setIgniteHome
if [ "${DEFAULT_CONFIG:-}" == "" ]; then
DEFAULT_CONFIG=config/default-config.xml
fi
#
# Parse command line parameters.
#
. "${SCRIPTS_HOME}"/include/parseargs.sh
#
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
CP="${IGNITE_LIBS}"
RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
RESTART_SUCCESS_FILE="${IGNITE_HOME}/work/ignite_success_${RANDOM_NUMBER}"
RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
# Mac OS specific support to display correct name in the dock.
osname=`uname`
if [ "${DOCK_OPTS:-}" == "" ]; then
DOCK_OPTS="-Xdock:name=Ignite Node"
fi
#
# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
#
# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
#
if [ -z "$JVM_OPTS" ] ; then
JVM_OPTS="-Xms1g -Xmx1g -server -XX:MaxMetaspaceSize=256m"
fi
#
# Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
#
# JVM_OPTS="$JVM_OPTS -XX:+UseG1GC"
#
# Uncomment if you get StackOverflowError.
# On 64 bit systems this value can be larger, e.g. -Xss16m
#
# JVM_OPTS="${JVM_OPTS} -Xss4m"
#
# Uncomment to set preference for IPv4 stack.
#
# JVM_OPTS="${JVM_OPTS} -Djava.net.preferIPv4Stack=true"
#
# Assertions are disabled by default since version 3.5.
# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
#
ENABLE_ASSERTIONS="0"
#
# Set '-ea' options if assertions are enabled.
#
if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
JVM_OPTS="${JVM_OPTS} -ea"
fi
#
# Set main class to start service (grid node by default).
#
if [ "${MAIN_CLASS:-}" = "" ]; then
MAIN_CLASS=org.apache.ignite.startup.cmdline.CommandLineStartup
fi
#
# Remote debugging (JPDA).
# Uncomment and change if remote debugging is required.
#
# JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787 ${JVM_OPTS}"
#
# Final JVM_OPTS for Java 9+ compatibility
#
if [ $version -eq 8 ] ; then
JVM_OPTS="\
-XX:+AggressiveOpts \
${JVM_OPTS}"
elif [ $version -gt 8 ] && [ $version -lt 11 ]; then
JVM_OPTS="\
-XX:+AggressiveOpts \
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--illegal-access=permit \
--add-modules=java.xml.bind \
${JVM_OPTS}"
elif [ $version -ge 11 ] ; then
JVM_OPTS="\
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED \
--illegal-access=permit \
${JVM_OPTS}"
fi
ERRORCODE="-1"
while [ "${ERRORCODE}" -ne "130" ]
do
if [ "${INTERACTIVE}" == "1" ] ; then
case $osname in
Darwin*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?"
;;
*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?"
;;
esac
else
case $osname in
Darwin*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?"
;;
*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?"
;;
esac
fi
if [ ! -f "${RESTART_SUCCESS_FILE}" ] ; then
break
else
rm -f "${RESTART_SUCCESS_FILE}"
fi
done
if [ -f "${RESTART_SUCCESS_FILE}" ] ; then
rm -f "${RESTART_SUCCESS_FILE}"
fi

@ -0,0 +1,35 @@
::
:: 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.
::
::
:: Grid router command line loader.
::
@echo off
if "%OS%" == "Windows_NT" setlocal
::
:: Set router service environment.
::
set "DEFAULT_CONFIG=config\router\default-router.xml"
set MAIN_CLASS=org.apache.ignite.internal.client.router.impl.GridRouterCommandLineStartup
::
:: Start router service.
::
call "%~dp0\ignite.bat" %*

@ -0,0 +1,53 @@
#!/bin/bash
#
# 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.
#
#
# Router command line loader.
#
#
# Import common functions.
#
if [ "${IGNITE_HOME}" = "" ]; then
IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")"
else
IGNITE_HOME_TMP=${IGNITE_HOME}
fi
#
# Set SCRIPTS_HOME - base path to scripts.
#
SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
source "${SCRIPTS_HOME}"/include/functions.sh
#
# Discover IGNITE_HOME environment variable.
#
setIgniteHome
#
# Set router service environment.
#
export DEFAULT_CONFIG=config/router/default-router.xml
export MAIN_CLASS=org.apache.ignite.internal.client.router.impl.GridRouterCommandLineStartup
#
# Start router service.
#
. "${SCRIPTS_HOME}"/ignite.sh $@

@ -0,0 +1,202 @@
::
:: 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.
::
::
:: Starts Ignite Visor Console.
::
@echo off
Setlocal EnableDelayedExpansion
if "%OS%" == "Windows_NT" setlocal
:: Check JAVA_HOME.
if defined JAVA_HOME goto checkJdk
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
echo Please point JAVA_HOME variable to location of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdk
:: Check that JDK is where it should be.
if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
echo %0, ERROR:
echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdkVersion
set cmd="%JAVA_HOME%\bin\java.exe"
for /f "tokens=* USEBACKQ" %%f in (`%cmd% -version 2^>^&1`) do (
set var=%%f
goto :LoopEscape
)
:LoopEscape
for /f "tokens=1-3 delims= " %%a in ("%var%") do set JAVA_VER_STR=%%c
set JAVA_VER_STR=%JAVA_VER_STR:"=%
for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set MAJOR_JAVA_VER=%%a& set MINOR_JAVA_VER=%%b
if %MAJOR_JAVA_VER% == 1 set MAJOR_JAVA_VER=%MINOR_JAVA_VER%
if %MAJOR_JAVA_VER% LSS 8 (
echo %0, ERROR:
echo The version of JAVA installed in %JAVA_HOME% is incorrect.
echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
)
:: Check IGNITE_HOME.
:checkIgniteHome1
if defined IGNITE_HOME goto checkIgniteHome2
pushd "%~dp0"/..
set IGNITE_HOME=%CD%
popd
:checkIgniteHome2
:: Strip double quotes from IGNITE_HOME
set IGNITE_HOME=%IGNITE_HOME:"=%
:: remove all trailing slashes from IGNITE_HOME.
if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
goto checkIgniteHome3
:removeTrailingSlash
set IGNITE_HOME=%IGNITE_HOME:~0,-1%
goto checkIgniteHome2
:checkIgniteHome3
if exist "%IGNITE_HOME%\config" goto checkIgniteHome4
echo %0, ERROR: Ignite installation folder is not found or IGNITE_HOME environment variable is not valid.
echo Please create IGNITE_HOME environment variable pointing to location of
echo Ignite installation folder.
goto error_finish
:checkIgniteHome4
::
:: Set SCRIPTS_HOME - base path to scripts.
::
set SCRIPTS_HOME=%IGNITE_HOME%\bin
:: Remove trailing spaces
for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
if /i "%SCRIPTS_HOME%\" == "%~dp0" goto setProgName
echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
:setProgName
::
:: Set program name.
::
set PROG_NAME=ignitevisorcmd.bat
if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
::
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
set CP=%IGNITE_HOME%\bin\include\visor-common\*;%IGNITE_HOME%\bin\include\visorcmd\*;%IGNITE_LIBS%
::
:: Parse command line parameters.
::
call "%SCRIPTS_HOME%\include\parseargs.bat" %*
if %ERRORLEVEL% neq 0 (
echo Arguments parsing failed
exit /b %ERRORLEVEL%
)
::
:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
::
:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
::
if "%JVM_OPTS_VISOR%" == "" set JVM_OPTS_VISOR=-Xms1g -Xmx1g -XX:MaxPermSize=128M
::
:: Uncomment to set preference to IPv4 stack.
::
:: set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -Djava.net.preferIPv4Stack=true
::
:: Assertions are disabled by default since version 3.5.
:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
::
set ENABLE_ASSERTIONS=0
::
:: Set '-ea' options if assertions are enabled.
::
if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -ea
::
:: Program args.
::
if "%ARGS%" == "" set ARGS=%*
::
:: Final JVM_OPTS for Java 9+ compatibility
::
if %MAJOR_JAVA_VER% == 8 (
set JVM_OPTS= ^
-XX:+AggressiveOpts ^
%JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 9 if %MAJOR_JAVA_VER% LSS 11 (
set JVM_OPTS= ^
-XX:+AggressiveOpts ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--illegal-access=permit ^
--add-modules=java.xml.bind ^
%JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 11 (
set JVM_OPTS= ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED ^
--illegal-access=permit ^
%JVM_OPTS%
)
::
:: Starts Visor console.
::
"%JAVA_HOME%\bin\java.exe" %JVM_OPTS_VISOR% -DIGNITE_PROG_NAME="%PROG_NAME%" ^
-DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED %QUIET% %JVM_XOPTS% -cp "%CP%" ^
org.apache.ignite.visor.commands.VisorConsole %ARGS%
:error_finish
if not "%NO_PAUSE%" == "1" pause
goto :eof

@ -0,0 +1,170 @@
#!/usr/bin/env bash
if [ ! -z "${IGNITE_SCRIPT_STRICT_MODE:-}" ]
then
set -o nounset
set -o errexit
set -o pipefail
set -o errtrace
set -o functrace
fi
#
# 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.
#
# Remember command line parameters
ARGS=$@
#
# Import common functions.
#
if [ "${IGNITE_HOME:-}" = "" ];
then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
else IGNITE_HOME_TMP=${IGNITE_HOME};
fi
#
# Set SCRIPTS_HOME - base path to scripts.
#
SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
source "${SCRIPTS_HOME}"/include/functions.sh
#
# Discover path to Java executable and check it's version.
#
checkJava
#
# Discover IGNITE_HOME environment variable.
#
setIgniteHome
#
# Parse command line parameters.
#
. "${SCRIPTS_HOME}"/include/parseargs.sh
#
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
CP="${IGNITE_HOME}/bin/include/visor-common/*${SEP}${IGNITE_HOME}/bin/include/visorcmd/*${SEP}${IGNITE_LIBS}"
#
# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
#
# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
#
JVM_OPTS="-Xms1g -Xmx1g -XX:MaxPermSize=128M -server ${JVM_OPTS}"
# Mac OS specific support to display correct name in the dock.
osname=`uname`
if [ "${DOCK_OPTS:-}" == "" ]; then
DOCK_OPTS="-Xdock:name=Visor - Ignite Shell Console"
fi
#
# Uncomment to set preference for IPv4 stack.
#
# JVM_OPTS="${JVM_OPTS} -Djava.net.preferIPv4Stack=true"
#
# Assertions are disabled by default since version 3.5.
# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
#
ENABLE_ASSERTIONS="0"
#
# Set '-ea' options if assertions are enabled.
#
if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
JVM_OPTS="${JVM_OPTS} -ea"
fi
#
# Save terminal setting. Used to restore terminal on finish.
#
SAVED_STTY=`stty -g 2>/dev/null`
#
# Restores terminal.
#
function restoreSttySettings() {
stty ${SAVED_STTY}
}
#
# Trap that restores terminal in case script execution is interrupted.
#
trap restoreSttySettings INT
#
# Final JVM_OPTS for Java 9+ compatibility
#
if [ $version -eq 8 ] ; then
JVM_OPTS="\
-XX:+AggressiveOpts \
${JVM_OPTS}"
elif [ $version -gt 8 ] && [ $version -lt 11 ]; then
JVM_OPTS="\
-XX:+AggressiveOpts \
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--illegal-access=permit \
--add-modules=java.xml.bind \
${JVM_OPTS}"
elif [ $version -ge 11 ] ; then
JVM_OPTS="\
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
--illegal-access=permit \
${JVM_OPTS}"
fi
#
# Start Visor console.
#
case $osname in
Darwin*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" \
-DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0" \
-DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED ${JVM_XOPTS} -cp "${CP}" \
org.apache.ignite.visor.commands.VisorConsole ${ARGS}
;;
*)
"$JAVA" ${JVM_OPTS} ${QUIET} \
-DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0" -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED \
${JVM_XOPTS} -cp "${CP}" \
org.apache.ignite.visor.commands.VisorConsole ${ARGS}
;;
esac
#
# Restore terminal.
#
restoreSttySettings

@ -0,0 +1,144 @@
#!/usr/bin/env bash
if [ ! -z "${IGNITE_SCRIPT_STRICT_MODE:-}" ]
then
set -o nounset
set -o errexit
set -o pipefail
set -o errtrace
set -o functrace
fi
#
# 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.
#
#
# This is a collection of utility functions to be used in other Ignite scripts.
# Before calling any function from this file you have to import it:
# if [ "${IGNITE_HOME}" = "" ];
# then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
# else IGNITE_HOME_TMP=${IGNITE_HOME};
# fi
#
# source "${IGNITE_HOME_TMP}"/bin/include/functions.sh
#
# Extract java version to `version` variable.
javaVersion() {
version=$("$1" -version 2>&1 | awk -F[\"\-] '/version/ {print $2}')
}
# Extract only major version of java to `version` variable.
javaMajorVersion() {
javaVersion "$1"
version="${version%%.*}"
if [ ${version} -eq 1 ]; then
# Version seems starts from 1, we need second number.
javaVersion "$1"
version=$(awk -F[\"\.] '{print $2}' <<< ${version})
fi
}
#
# Discovers path to Java executable and checks it's version.
# The function exports JAVA variable with path to Java executable.
#
checkJava() {
# Check JAVA_HOME.
if [ "${JAVA_HOME:-}" = "" ]; then
JAVA=`type -p java`
RETCODE=$?
if [ $RETCODE -ne 0 ]; then
echo $0", ERROR:"
echo "JAVA_HOME environment variable is not found."
echo "Please point JAVA_HOME variable to location of JDK 1.8 or later."
echo "You can also download latest JDK at http://java.com/download"
exit 1
fi
JAVA_HOME=
else
JAVA=${JAVA_HOME}/bin/java
fi
#
# Check JDK.
#
javaMajorVersion "$JAVA"
if [ $version -lt 8 ]; then
echo "$0, ERROR:"
echo "The $version version of JAVA installed in JAVA_HOME=$JAVA_HOME is incompatible."
echo "Please point JAVA_HOME variable to installation of JDK 1.8 or later."
echo "You can also download latest JDK at http://java.com/download"
exit 1
fi
}
#
# Discovers IGNITE_HOME environment variable.
# The function expects IGNITE_HOME_TMP variable is set and points to the directory where the callee script resides.
# The function exports IGNITE_HOME variable with path to Ignite home directory.
#
setIgniteHome() {
#
# Set IGNITE_HOME, if needed.
#
if [ "${IGNITE_HOME:-}" = "" ]; then
export IGNITE_HOME=${IGNITE_HOME_TMP}
fi
#
# Check IGNITE_HOME is valid.
#
if [ ! -d "${IGNITE_HOME}/config" ]; then
echo $0", ERROR:"
echo "Ignite installation folder is not found or IGNITE_HOME environment variable is not valid."
echo "Please create IGNITE_HOME environment variable pointing to location of Ignite installation folder."
exit 1
fi
#
# Check IGNITE_HOME points to current installation.
#
if [ "${IGNITE_HOME}" != "${IGNITE_HOME_TMP}" ] &&
[ "${IGNITE_HOME}" != "${IGNITE_HOME_TMP}/" ]; then
echo $0", WARN: IGNITE_HOME environment variable may be pointing to wrong folder: $IGNITE_HOME"
fi
}
#
# Gets correct Java class path separator symbol for the given platform.
# The function exports SEP variable with class path separator symbol.
#
getClassPathSeparator() {
SEP=":";
case "`uname`" in
MINGW*)
SEP=";";
export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
;;
CYGWIN*)
SEP=";";
export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
;;
esac
}

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.

@ -0,0 +1,66 @@
// ------------------------------------------------------------------
// List of ignite-spring module's dependencies provided as a part of this distribution.
// ------------------------------------------------------------------
==============================================================================
For Spring AOP (https://github.com/spring-projects/spring-framework) org.springframework:spring-aop:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring AOP which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Beans (https://github.com/spring-projects/spring-framework) org.springframework:spring-beans:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Beans which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Context (https://github.com/spring-projects/spring-framework) org.springframework:spring-context:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Context which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Core (https://github.com/spring-projects/spring-framework) org.springframework:spring-core:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Core which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Expression Language (SpEL) (https://github.com/spring-projects/spring-framework) org.springframework:spring-expression:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Expression Language (SpEL) which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring JDBC (https://github.com/spring-projects/spring-framework) org.springframework:spring-jdbc:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring JDBC which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Transaction (https://github.com/spring-projects/spring-framework) org.springframework:spring-tx:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Transaction which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
==============================================================================
This product bundles Commons Logging which is available under the following:
The Apache Software License, Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt.
==============================================================================
For ignite-core (http://ignite.apache.org) org.apache.ignite:ignite-core:jar:2.11.0
==============================================================================
This product bundles ignite-core which is available under the following:
The Apache Software License, Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt.
==============================================================================
For ignite-indexing (http://ignite.apache.org) org.apache.ignite:ignite-indexing:jar:2.11.0
==============================================================================
This product bundles ignite-indexing which is available under the following:
The Apache Software License, Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt.

@ -0,0 +1,12 @@
// ------------------------------------------------------------------
// List of ignite-sqlline module's dependencies provided as a part of this distribution.
// ------------------------------------------------------------------
==============================================================================
For sqlline (https://github.com/julianhyde/sqlline) sqlline:sqlline:jar:1.9.0
==============================================================================
This product bundles sqlline which is available under the following:
Modified BSD License. For details, see https://opensource.org/licenses/BSD-3-Clause.

@ -0,0 +1,18 @@
// ------------------------------------------------------------------
// List of ignite-ssh module's dependencies provided as a part of this distribution.
// ------------------------------------------------------------------
==============================================================================
For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.54
==============================================================================
This product bundles JSch which is available under the following:
Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
==============================================================================
For ignite-core (http://ignite.apache.org) org.apache.ignite:ignite-core:jar:2.11.0
==============================================================================
This product bundles ignite-core which is available under the following:
The Apache Software License, Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt.

@ -0,0 +1,60 @@
// ------------------------------------------------------------------
// List of ignite-visor-console module's dependencies provided as a part of this distribution.
// ------------------------------------------------------------------
==============================================================================
For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
==============================================================================
This product bundles JLine which is available under the following:
The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
==============================================================================
For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.11.12
==============================================================================
This product bundles Scala Library which is available under the following:
BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
==============================================================================
For Spring Beans (https://github.com/spring-projects/spring-framework) org.springframework:spring-beans:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Beans which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Context (https://github.com/spring-projects/spring-framework) org.springframework:spring-context:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Context which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Core (https://github.com/spring-projects/spring-framework) org.springframework:spring-core:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Core which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For Spring Expression Language (SpEL) (https://github.com/spring-projects/spring-framework) org.springframework:spring-expression:jar:4.3.26.RELEASE
==============================================================================
This product bundles Spring Expression Language (SpEL) which is available under the following:
Apache License, Version 2.0. For details, see https://www.apache.org/licenses/LICENSE-2.0.
==============================================================================
For ignite-core (http://ignite.apache.org) org.apache.ignite:ignite-core:jar:2.11.0
==============================================================================
This product bundles ignite-core which is available under the following:
The Apache Software License, Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt.
==============================================================================
For ignite-spring (http://ignite.apache.org) org.apache.ignite:ignite-spring:jar:2.11.0
==============================================================================
This product bundles ignite-spring which is available under the following:
The Apache Software License, Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt.
==============================================================================
For ignite-ssh (http://ignite.apache.org) org.apache.ignite:ignite-ssh:jar:2.11.0
==============================================================================
This product bundles ignite-ssh which is available under the following:
The Apache Software License, Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt.

@ -0,0 +1,52 @@
::
:: 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.
::
@echo off
::
:: Parses command line parameters into Ignite variables that are common for the launcher scripts:
:: CONFIG
:: INTERACTIVE
:: QUIET
:: NO_PAUSE
:: JVM_XOPTS
::
:: Script setups reasonable defaults (see below) for omitted arguments.
::
:: Scripts accepts following incoming variables:
:: DEFAULT_CONFIG
::
:: Can be used like:
:: call "%IGNITE_HOME%\bin\include\parseargs.bat" %*
:: if %ERRORLEVEL% neq 0 (
:: echo Arguments parsing failed
:: exit /b %ERRORLEVEL%
:: )
:: in other scripts to parse common command lines parameters.
set convertArgsCmd="!JAVA_HOME!\bin\java.exe" -cp "%CP%" org.apache.ignite.startup.cmdline.CommandLineTransformer %*
for /f "usebackq tokens=*" %%i in (`"!convertArgsCmd!"`) do set reformattedArgs=%%i
for %%i in (%reformattedArgs%) do (
if "%%i" == "CommandLineTransformerError" exit /b 1
set %%i
)
if not defined CONFIG set CONFIG=%DEFAULT_CONFIG%
exit /b 0

@ -0,0 +1,69 @@
#!/usr/bin/env bash
if [ ! -z "${IGNITE_SCRIPT_STRICT_MODE:-}" ]
then
set -o nounset
set -o errexit
set -o pipefail
set -o errtrace
set -o functrace
fi
#
# 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.
#
#
# Parses command line parameters into Ignite variables that are common for the launcher scripts:
# CONFIG
# INTERACTIVE
# QUIET
# JVM_XOPTS
#
# Script setups reasonable defaults (see below) for omitted arguments.
#
# Scripts accepts following incoming variables:
# DEFAULT_CONFIG
#
# Can be used like:
# . "${IGNITE_HOME}"/bin/include/parseargs.sh
# in other scripts to parse common command lines parameters.
#
CONFIG=${DEFAULT_CONFIG:-}
INTERACTIVE="0"
QUIET="-DIGNITE_QUIET=true"
JVM_XOPTS=""
while [ $# -gt 0 ]
do
case "$1" in
-i) INTERACTIVE="1";;
-v) QUIET="-DIGNITE_QUIET=false";;
-J*) JVM_XOPTS="$JVM_XOPTS ${1:2}";;
*) CONFIG="$1";;
esac
shift
done
#
# Set 'file.encoding' to UTF-8 default if not specified otherwise
#
case "${JVM_OPTS:-}" in
*-Dfile.encoding=*)
;;
*)
JVM_OPTS="${JVM_OPTS:-} -Dfile.encoding=UTF-8";;
esac

@ -0,0 +1,56 @@
::
:: 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.
::
::
:: Exports IGNITE_LIBS variable containing classpath for Ignite.
:: Expects IGNITE_HOME to be set.
:: Can be used like:
:: call %IGNITE_HOME%\bin\include\setenv.bat
:: in other scripts to set classpath using exported IGNITE_LIBS variable.
::
@echo off
:: USER_LIBS variable can optionally contain user's JARs/libs.
:: set USER_LIBS=
::
:: Check IGNITE_HOME.
::
if defined IGNITE_HOME goto run
echo %0, ERROR: Ignite installation folder is not found.
echo Please create IGNITE_HOME environment variable pointing to location of
echo Ignite installation folder.
goto :eof
:run
:: The following libraries are required for Ignite.
set IGNITE_LIBS=%IGNITE_HOME%\libs\*
if not exist "%IGNITE_LIBS%" goto :eof
for /F %%F in ('dir /A:D /b "%IGNITE_LIBS%"') do (
if not "%%F" == "optional" call :concat "%IGNITE_HOME%\libs\%%F\*"
)
if defined USER_LIBS set IGNITE_LIBS=%USER_LIBS%;%IGNITE_LIBS%
goto :eof
:concat
set IGNITE_LIBS=%IGNITE_LIBS%;%~1
goto :eof

@ -0,0 +1,82 @@
#!/usr/bin/env bash
if [ ! -z "${IGNITE_SCRIPT_STRICT_MODE:-}" ]
then
set -o nounset
set -o errexit
set -o pipefail
set -o errtrace
set -o functrace
fi
#
# 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.
#
#
# Exports IGNITE_LIBS variable containing classpath for Ignite.
# Expects IGNITE_HOME to be set.
# Can be used like:
# . "${IGNITE_HOME}"/bin/include/setenv.sh
# in other scripts to set classpath using exported IGNITE_LIBS variable.
#
#
# Check IGNITE_HOME.
#
if [ "${IGNITE_HOME:-}" = "" ]; then
echo $0", ERROR: Ignite installation folder is not found."
echo "Please create IGNITE_HOME variable pointing to location of"
echo "Ignite installation folder."
exit 1
fi
#
# OS specific support.
#
SEP=":";
case "`uname`" in
MINGW*)
SEP=";";
export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
;;
CYGWIN*)
SEP=";";
export IGNITE_HOME=`echo $IGNITE_HOME | sed -e 's/^\/\([a-zA-Z]\)/\1:/'`
;;
esac
#
# Libraries included in classpath.
#
IGNITE_LIBS="${IGNITE_HOME}/libs/*"
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for file in ${IGNITE_HOME}/libs/*
do
if [ -d ${file} ] && [ "${file}" != "${IGNITE_HOME}"/libs/optional ]; then
IGNITE_LIBS=${IGNITE_LIBS:-}${SEP}${file}/*
fi
done
IFS=$SAVEIFS
if [ "${USER_LIBS:-}" != "" ]; then
IGNITE_LIBS=${USER_LIBS:-}${SEP}${IGNITE_LIBS}
fi

@ -0,0 +1,150 @@
::
:: 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.
::
::
:: Ignite database connector.
::
@echo off
Setlocal EnableDelayedExpansion
if "%OS%" == "Windows_NT" setlocal
:: Check JAVA_HOME.
if defined JAVA_HOME goto checkJdk
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
echo Please point JAVA_HOME variable to location of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdk
:: Check that JDK is where it should be.
if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
echo %0, ERROR:
echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
:checkJdkVersion
set cmd="%JAVA_HOME%\bin\java.exe"
for /f "tokens=* USEBACKQ" %%f in (`%cmd% -version 2^>^&1`) do (
set var=%%f
goto :LoopEscape
)
:LoopEscape
:: Check IGNITE_HOME.
:checkIgniteHome1
if defined IGNITE_HOME goto checkIgniteHome2
pushd "%~dp0"/..
set IGNITE_HOME=%CD%
popd
:checkIgniteHome2
:: Strip double quotes from IGNITE_HOME
set IGNITE_HOME=%IGNITE_HOME:"=%
:: remove all trailing slashes from IGNITE_HOME.
if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
goto checkIgniteHome3
:removeTrailingSlash
set IGNITE_HOME=%IGNITE_HOME:~0,-1%
goto checkIgniteHome2
:checkIgniteHome3
if exist "%IGNITE_HOME%\config" goto checkIgniteHome4
echo %0, ERROR: Ignite installation folder is not found or IGNITE_HOME environment variable is not valid.
echo Please create IGNITE_HOME environment variable pointing to location of Ignite installation folder.
goto error_finish
:checkIgniteHome4
::
:: Set SCRIPTS_HOME - base path to scripts.
::
set SCRIPTS_HOME=%IGNITE_HOME%\bin
:: Remove trailing spaces
for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
if /i "%SCRIPTS_HOME%\" == "%~dp0" goto setProgName
echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
:setProgName
::
:: Set program name.
::
set PROG_NAME=sqlline.bat
if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:run
::
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
for /f "tokens=1-3 delims= " %%a in ("%var%") do set JAVA_VER_STR=%%c
set JAVA_VER_STR=%JAVA_VER_STR:"=%
for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set MAJOR_JAVA_VER=%%a& set MINOR_JAVA_VER=%%b
if %MAJOR_JAVA_VER% == 8 (
set JVM_OPTS= ^
-XX:+AggressiveOpts ^
%JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 9 if %MAJOR_JAVA_VER% LSS 11 (
set JVM_OPTS= ^
-XX:+AggressiveOpts ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--illegal-access=permit ^
--add-modules=java.xml.bind ^
%JVM_OPTS%
)
if %MAJOR_JAVA_VER% GEQ 11 (
set JVM_OPTS= ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED ^
--illegal-access=permit ^
%JVM_OPTS%
)
set CP=%IGNITE_LIBS%
set CP=%CP%;%IGNITE_HOME%\bin\include\sqlline\*
:: Between version 2 and 3, jline changed the format of its history file. After this change,
:: the Ignite provides --historyfile argument to SQLLine usage
set SQLLINE_HISTORY=%HOMEPATH%\.sqlline\ignite_history
"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% -cp "%CP%" sqlline.SqlLine --historyFile=%SQLLINE_HISTORY% %*
:error_finish

@ -0,0 +1,118 @@
#!/usr/bin/env bash
if [ ! -z "${IGNITE_SCRIPT_STRICT_MODE:-}" ]
then
set -o nounset
set -o errexit
set -o pipefail
set -o errtrace
set -o functrace
fi
#
# 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.
#
#
# Ignite database connector.
#
#
# Import common functions.
#
if [ "${IGNITE_HOME:-}" = "" ];
then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
else IGNITE_HOME_TMP=${IGNITE_HOME};
fi
echo "ignite home tmp $IGNITE_HOME_TMP"
#
# Set SCRIPTS_HOME - base path to scripts.
#
#SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
SCRIPTS_HOME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "${SCRIPTS_HOME}"/include/functions.sh
#
# Discover path to Java executable and check it's version.
#
checkJava
#
# Discover IGNITE_HOME environment variable.
#
#setIgniteHome
if [ "${IGNITE_HOME:-}" = "" ]; then
export IGNITE_HOME=${IGNITE_HOME_TMP}
fi
#
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
JVM_OPTS=""
JVM_OPTS=${JVM_OPTS:-}
version=11
#
# Final JVM_OPTS for Java 9+ compatibility
#
if [ $version -eq 8 ] ; then
JVM_OPTS="\
-XX:+AggressiveOpts \
${JVM_OPTS}"
elif [ $version -gt 8 ] && [ $version -lt 11 ]; then
JVM_OPTS="\
-XX:+AggressiveOpts \
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--illegal-access=permit \
--add-modules=java.xml.bind \
${JVM_OPTS}"
elif [ $version -ge 11 ] ; then
JVM_OPTS="\
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
--illegal-access=permit \
${JVM_OPTS}"
fi
JDBCLINK="jdbc:ignite:thin://${HOST_AND_PORT:-}${SCHEMA_DELIMITER:-}${SCHEMA:-}${PARAMS:-}"
#CP="${IGNITE_LIBS}"
#CP="${CP}${SEP}${IGNITE_HOME_TMP}/bin/include/sqlline/*"
CP=""
# Between version 2 and 3, jline changed the format of its history file. After this change,
# the Ignite provides --historyfile argument to SQLLine usage
SQLLINE_HISTORY="~/.sqlline/ignite_history"
parentSCRIPT_HOME="$(dirname "$PWD")/apache-ignite-2.11.0-bin"
if [ "$CP" == "" ]; then
CP=$parentSCRIPT_HOME/libs/*:$parentSCRIPT_HOME/libs/ignite-control-utility/*:$parentSCRIPT_HOME/libs/ignite-indexing/*:$parentSCRIPT_HOME/libs/ignite-spring/*:$parentSCRIPT_HOME/libs/licenses/*:$parentSCRIPT_HOME/bin/include/sqlline/*
fi
echo "$JAVA ${JVM_OPTS} -cp ${CP} sqlline.SqlLine --historyFile=${SQLLINE_HISTORY} $@"
java ${JVM_OPTS} -cp ${CP} sqlline.SqlLine --historyFile=${SQLLINE_HISTORY} $@

@ -0,0 +1,129 @@
Apache Ignite Dependencies
--------------------------
Current folder contains JAR files for all Apache Ignite modules along with their dependencies.
When node is started using 'ignite.{sh|bat}' script, all JARs and classes located in
'libs' folder and all its sub-folders except 'optional' are added to classpath of the node.
By default, only Apache Ignite core JAR and a minimum set of modules is enabled, while other
modules are located in 'optional' folder and therefore disabled.
To enable any of optional Ignite modules when starting a standalone node,
move corresponding module folder from 'libs/optional' to 'libs' before running
'ignite.{sh|bat}' script. The content of the module folder will be added to
classpath in this case.
If you need to add your own classes to classpath of the node (e.g., task classes), put them
to 'libs' folder. You can create a subfolder for convenience as well.
Importing Ignite Dependencies In Maven Project
------------------------------------------------
If you are using Maven to manage dependencies of your project, there are two options:
1. Import:
- apache-ignite (all inclusive)
Here is how 'apache-ignite' can be added to your POM file (replace '${ignite.version}'
with actual Ignite version you are interested in):
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<dependencies>
...
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>apache-ignite</artifactId>
<version>${ignite.version}</version>
</dependency>
...
</dependencies>
...
</project>
2. Or import individual Apache Ignite modules a la carte.
Alternatively you can import Ignite modules a la carte, one by one.
The only required module is 'ignite-core', all others are optional.
Here is how it can be imported into your POM file:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<dependencies>
...
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-core</artifactId>
<version>${ignite.version}</version>
</dependency>
...
</dependencies>
...
</project>
All optional modules can be imported just like the core module, but with different artifact IDs.
The following modules are available:
- ignite-aop (for AOP-based grid-enabling)
- ignite-aws (for seemless cluster discovery on AWS S3)
- ignite-cassandra (for Apache Cassandra integration)
- ignite-cloud (for Apache JClouds integration)
- ignite-gce (for automatic cluster discovery on Google Compute Engine)
- ignite-hibernate (for Hibernate integration)
- ignite-hibernate5 (for Hibernate5 integration)
- ignite-indexing (for SQL querying and indexing)
- ignite-jcl (for Apache Commons logging)
- ignite-jta (for XA integration)
- ignite-logj4 (for Log4j logging)
- ignite-log4j2 (for Log4j 2 logging)
- ignite-mesos (for integration with Apache Mesos cluster resource manager)
- ignite-osgi (to allow Ignite run seemlessly in OSGI containers)
- ignite-osgi-karaf (to seemlessly intall ignite into Apache Karaf container)
- ignite-osgi-paxlogging (to expose PAX Logging API to Log4j if needed)
- ignite-rest-http (for HTTP REST messages)
- ignite-scalar (for ignite Scala API)
- ignite-scalar_2.10 (for Ignite Scala 2.10 API)
- ignite-schedule (for Cron-based task scheduling)
- ignite-sl4j (for SL4J logging)
- ignite-spark (for shared in-memory RDDs and faster SQL for Apache Spark)
- ignite-spring (for Spring-based configuration support)
- ignite-ssh (for starting grid nodes on remote machines)
- ignite-urideploy (for URI-based deployment)
- ignite-web (for Web Sessions Clustering)
- ignite-yarn (for integration with Apache Hadoop Yarn)
- ignite-zookeeper (for cluster discovery based on Apache Zookeeper)
For example, if you want to use Apache Ignite Spring-based configuration,
you should add 'ignite-spring' module like this:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<dependencies>
...
<!-- Core module. -->
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-core</artifactId>
<version>${ignite.version}</version>
</dependency>
<!-- Optional. -->
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-spring</artifactId>
<version>${ignite.version}</version>
</dependency>
...
</dependencies>
...
</project>
Loading…
Cancel
Save