You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/03 12:59:42 UTC
ignite git commit: IGNITE-1364: Removed last "gridgain" notions.
Repository: ignite
Updated Branches:
refs/heads/ignite-1364 0d70d547c -> a79962c59
IGNITE-1364: Removed last "gridgain" notions.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a79962c5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a79962c5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a79962c5
Branch: refs/heads/ignite-1364
Commit: a79962c596bb15f211b4af26438ba4a909a3be01
Parents: 0d70d54
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Sep 3 14:00:19 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Sep 3 14:00:19 2015 +0300
----------------------------------------------------------------------
.../core/include/ignite/grid_configuration.h | 6 ++--
.../core/os/linux/include/ignite/impl/utils.h | 20 +++++------
.../main/cpp/core/os/linux/src/impl/utils.cpp | 34 +++++++-----------
.../cpp/core/os/win/include/ignite/impl/utils.h | 20 +++++------
.../src/main/cpp/core/os/win/src/impl/utils.cpp | 36 ++++++++------------
.../src/main/cpp/core/src/grid_error.cpp | 4 +--
.../src/main/cpp/core/src/grid_factory.cpp | 18 +++++-----
7 files changed, 61 insertions(+), 77 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/a79962c5/modules/platform/src/main/cpp/core/include/ignite/grid_configuration.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/grid_configuration.h b/modules/platform/src/main/cpp/core/include/ignite/grid_configuration.h
index 65d2c8e..fd03cc1 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/grid_configuration.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/grid_configuration.h
@@ -54,8 +54,8 @@ namespace ignite
*/
struct GridConfiguration
{
- /** Path to GridGain home. */
- char* gridGainHome;
+ /** Path to Ignite home. */
+ char* igniteHome;
/** Path to Spring configuration file. */
char* springCfgPath;
@@ -81,7 +81,7 @@ namespace ignite
/**
* Constructor.
*/
- GridConfiguration() : gridGainHome(NULL), springCfgPath(NULL), jvmLibPath(NULL), jvmClassPath(NULL),
+ GridConfiguration() : igniteHome(NULL), springCfgPath(NULL), jvmLibPath(NULL), jvmClassPath(NULL),
jvmInitMem(512), jvmMaxMem(1024), jvmOpts(NULL), jvmOptsLen(0)
{
// No-op.
http://git-wip-us.apache.org/repos/asf/ignite/blob/a79962c5/modules/platform/src/main/cpp/core/os/linux/include/ignite/impl/utils.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/os/linux/include/ignite/impl/utils.h b/modules/platform/src/main/cpp/core/os/linux/include/ignite/impl/utils.h
index f2fc6e3..8bbd2f7 100644
--- a/modules/platform/src/main/cpp/core/os/linux/include/ignite/impl/utils.h
+++ b/modules/platform/src/main/cpp/core/os/linux/include/ignite/impl/utils.h
@@ -87,39 +87,39 @@ namespace ignite
IGNITE_FRIEND_EXPORT bool LoadJvmLibrary(const std::string& path);
/**
- * Resolve GRIDGAIN_HOME directory. Resolution is performed in several
+ * Resolve IGNITE_HOME directory. Resolution is performed in several
* steps:
* 1) Check for path provided as argument.
* 2) Check for environment variable.
* 3) Check for current working directory.
* Result of these 3 checks are evaluated based on existence of certain
* predefined folders inside possible GG home. If they are found,
- * GRIDGAIN_HOME is considered resolved.
+ * IGNITE_HOME is considered resolved.
*
* @param path Optional path to evaluate.
- * @param found Whether GRIDGAIN_HOME home was found.
+ * @param found Whether IGNITE_HOME home was found.
* @return Resolved GG home.
*/
- IGNITE_FRIEND_EXPORT std::string ResolveGridGainHome(const std::string* path, bool* found);
+ IGNITE_FRIEND_EXPORT std::string ResolveIgniteHome(const std::string* path, bool* found);
/**
- * Create GridGain classpath based on user input and home directory.
+ * Create Ignite classpath based on user input and home directory.
*
* @param usrCp User's classpath.
- * @param home GridGain home directory.
+ * @param home Ignite home directory.
* @return Classpath.
*/
- IGNITE_FRIEND_EXPORT std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home);
+ IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home);
/**
- * Create GridGain classpath based on user input and home directory.
+ * Create Ignite classpath based on user input and home directory.
*
* @param usrCp User's classpath.
- * @param home GridGain home directory.
+ * @param home Ignite home directory.
* @param test Whether test classpath must be used.
* @return Classpath.
*/
- IGNITE_FRIEND_EXPORT std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home, bool test);
+ IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool test);
/**
* Safe array which automatically reclaims occupied memory when out of scope.
http://git-wip-us.apache.org/repos/asf/ignite/blob/a79962c5/modules/platform/src/main/cpp/core/os/linux/src/impl/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/os/linux/src/impl/utils.cpp b/modules/platform/src/main/cpp/core/os/linux/src/impl/utils.cpp
index 55d836a..ec45eb6 100644
--- a/modules/platform/src/main/cpp/core/os/linux/src/impl/utils.cpp
+++ b/modules/platform/src/main/cpp/core/os/linux/src/impl/utils.cpp
@@ -29,7 +29,7 @@ namespace ignite
const char* JAVA_HOME = "JAVA_HOME";
const char* JAVA_DLL = "/jre/lib/amd64/server/libjvm.so";
- const char* GRIDGAIN_HOME = "GRIDGAIN_HOME";
+ const char* IGNITE_HOME = "IGNITE_HOME";
const char* PROBE_BIN = "/bin";
const char* PROBE_EXAMPLES = "/examples";
@@ -72,7 +72,7 @@ namespace ignite
* @res Resolution result.
* @return Resolved directory.
*/
- std::string ResolveGridGainHome0(const std::string& path, bool up, bool* res)
+ std::string ResolveIgniteHome0(const std::string& path, bool up, bool* res)
{
struct stat pathStat;
@@ -116,7 +116,7 @@ namespace ignite
{
std::string parent = path0.substr(0, slashPos);
- return ResolveGridGainHome0(parent, true, res);
+ return ResolveIgniteHome0(parent, true, res);
}
}
@@ -233,12 +233,12 @@ namespace ignite
}
/**
- * Helper function to create classpath based on GridGain home directory.
+ * Helper function to create classpath based on Ignite home directory.
*
* @param home Home directory; expected to be valid.
* @param forceTest Force test classpath.
*/
- std::string CreateGridGainHomeClasspath(const std::string& home, bool forceTest)
+ std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest)
{
std::string res = std::string();
@@ -252,14 +252,6 @@ namespace ignite
std::string modulesPath = home + "/modules";
std::string modulesCp = ClasspathExploded(modulesPath, true);
res.append(modulesCp);
-
- std::string igniteExamplesPath = home + "/../incubator-ignite/examples";
- std::string igniteExamplesCp = ClasspathExploded(igniteExamplesPath, true);
- res.append(igniteExamplesCp);
-
- std::string igniteModulesPath = home + "/../incubator-ignite/modules";
- std::string igniteModulesCp = ClasspathExploded(igniteModulesPath, true);
- res.append(igniteModulesCp);
}
// 2. Add regular jars from "libs" folder excluding "optional".
@@ -383,19 +375,19 @@ namespace ignite
return hnd != NULL;
}
- std::string ResolveGridGainHome(const std::string* path, bool* found)
+ std::string ResolveIgniteHome(const std::string* path, bool* found)
{
if (path)
// 1. Check passed argument.
- return ResolveGridGainHome0(*path, false, found);
+ return ResolveIgniteHome0(*path, false, found);
else
{
// 2. Check environment variable.
bool envFound;
- std::string env = GetEnv(GRIDGAIN_HOME, &envFound);
+ std::string env = GetEnv(IGNITE_HOME, &envFound);
if (envFound)
- return ResolveGridGainHome0(env, false, found);
+ return ResolveIgniteHome0(env, false, found);
}
SetBoolResult(false, found);
@@ -403,7 +395,7 @@ namespace ignite
return std::string();
}
- std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home)
+ std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home)
{
bool forceTest = false;
@@ -415,10 +407,10 @@ namespace ignite
forceTest = envFound && env.compare("true") == 0;
}
- return CreateGridGainClasspath(usrCp, home, forceTest);
+ return CreateIgniteClasspath(usrCp, home, forceTest);
}
- std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home, bool forceTest)
+ std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool forceTest)
{
// 1. Append user classpath if it exists.
std::string cp = std::string();
@@ -434,7 +426,7 @@ namespace ignite
// 2. Append home classpath if home is defined.
if (home)
{
- std::string homeCp = CreateGridGainHomeClasspath(*home, forceTest);
+ std::string homeCp = CreateIgniteHomeClasspath(*home, forceTest);
cp.append(homeCp);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a79962c5/modules/platform/src/main/cpp/core/os/win/include/ignite/impl/utils.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/os/win/include/ignite/impl/utils.h b/modules/platform/src/main/cpp/core/os/win/include/ignite/impl/utils.h
index 3d72ae7..08e76ee 100644
--- a/modules/platform/src/main/cpp/core/os/win/include/ignite/impl/utils.h
+++ b/modules/platform/src/main/cpp/core/os/win/include/ignite/impl/utils.h
@@ -87,39 +87,39 @@ namespace ignite
IGNITE_FRIEND_EXPORT bool LoadJvmLibrary(const std::string& path);
/**
- * Resolve GRIDGAIN_HOME directory. Resolution is performed in several
+ * Resolve IGNITE_HOME directory. Resolution is performed in several
* steps:
* 1) Check for path provided as argument.
* 2) Check for environment variable.
* 3) Check for current working directory.
* Result of these 3 checks are evaluated based on existence of certain
* predefined folders inside possible GG home. If they are found,
- * GRIDGAIN_HOME is considered resolved.
+ * IGNITE_HOME is considered resolved.
*
* @param path Optional path to evaluate.
- * @param found Whether GRIDGAIN_HOME home was found.
+ * @param found Whether IGNITE_HOME home was found.
* @return Resolved GG home.
*/
- IGNITE_FRIEND_EXPORT std::string ResolveGridGainHome(const std::string* path, bool* found);
+ IGNITE_FRIEND_EXPORT std::string ResolveIgniteHome(const std::string* path, bool* found);
/**
- * Create GridGain classpath based on user input and home directory.
+ * Create Ignite classpath based on user input and home directory.
*
* @param usrCp User's classpath.
- * @param home GridGain home directory.
+ * @param home Ignite home directory.
* @return Classpath.
*/
- IGNITE_FRIEND_EXPORT std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home);
+ IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home);
/**
- * Create GridGain classpath based on user input and home directory.
+ * Create Ignite classpath based on user input and home directory.
*
* @param usrCp User's classpath.
- * @param home GridGain home directory.
+ * @param home Ignite home directory.
* @param test Whether test classpath must be used.
* @return Classpath.
*/
- IGNITE_FRIEND_EXPORT std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home, bool test);
+ IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool test);
/**
* Safe array which automatically reclaims occupied memory when out of scope.
http://git-wip-us.apache.org/repos/asf/ignite/blob/a79962c5/modules/platform/src/main/cpp/core/os/win/src/impl/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/os/win/src/impl/utils.cpp b/modules/platform/src/main/cpp/core/os/win/src/impl/utils.cpp
index bd17658..5a450c3 100644
--- a/modules/platform/src/main/cpp/core/os/win/src/impl/utils.cpp
+++ b/modules/platform/src/main/cpp/core/os/win/src/impl/utils.cpp
@@ -28,7 +28,7 @@ namespace ignite
const char* JAVA_HOME = "JAVA_HOME";
const char* JAVA_DLL = "\\jre\\bin\\server\\jvm.dll";
- const char* GRIDGAIN_HOME = "GRIDGAIN_HOME";
+ const char* IGNITE_HOME = "IGNITE_HOME";
const char* PROBE_BIN = "\\bin";
const char* PROBE_EXAMPLES = "\\examples";
@@ -71,7 +71,7 @@ namespace ignite
* @res Resolution result.
* @return Resolved directory.
*/
- std::string ResolveGridGainHome0(const std::string& path, bool up, bool* res)
+ std::string ResolveIgniteHome0(const std::string& path, bool up, bool* res)
{
DWORD attrs = GetFileAttributesA(path.c_str());
@@ -114,7 +114,7 @@ namespace ignite
{
std::string parent = path0.substr(0, slashPos);
- return ResolveGridGainHome0(parent, true, res);
+ return ResolveIgniteHome0(parent, true, res);
}
}
}
@@ -229,12 +229,12 @@ namespace ignite
}
/**
- * Helper function to create classpath based on GridGain home directory.
+ * Helper function to create classpath based on Ignite home directory.
*
* @param home Home directory; expected to be valid.
* @param forceTest Force test classpath.
*/
- std::string CreateGridGainHomeClasspath(const std::string& home, bool forceTest)
+ std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest)
{
std::string res = std::string();
@@ -248,14 +248,6 @@ namespace ignite
std::string modulesPath = home + "\\modules";
std::string modulesCp = ClasspathExploded(modulesPath, true);
res.append(modulesCp);
-
- std::string igniteExamplesPath = home + "\\..\\incubator-ignite\\examples";
- std::string igniteExamplesCp = ClasspathExploded(igniteExamplesPath, true);
- res.append(igniteExamplesCp);
-
- std::string igniteModulesPath = home + "\\..\\incubator-ignite\\modules";
- std::string igniteModulesCp = ClasspathExploded(igniteModulesPath, true);
- res.append(igniteModulesCp);
}
// 2. Add regular jars from "libs" folder excluding "optional".
@@ -388,19 +380,19 @@ namespace ignite
return mod != NULL;
}
- std::string ResolveGridGainHome(const std::string* path, bool* found)
+ std::string ResolveIgniteHome(const std::string* path, bool* found)
{
if (path)
// 1. Check passed argument.
- return ResolveGridGainHome0(*path, false, found);
+ return ResolveIgniteHome0(*path, false, found);
else
{
// 2. Check environment variable.
bool envFound;
- std::string env = GetEnv(GRIDGAIN_HOME, &envFound);
+ std::string env = GetEnv(IGNITE_HOME, &envFound);
if (envFound)
- return ResolveGridGainHome0(env, false, found);
+ return ResolveIgniteHome0(env, false, found);
// 3. Check current work dir.
const DWORD curDirLen = GetCurrentDirectory(0, NULL);
@@ -413,11 +405,11 @@ namespace ignite
delete[] curDir;
- return ResolveGridGainHome0(curDirStr, true, found);
+ return ResolveIgniteHome0(curDirStr, true, found);
}
}
- std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home)
+ std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home)
{
bool forceTest = false;
@@ -429,10 +421,10 @@ namespace ignite
forceTest = envFound && env.compare("true") == 0;
}
- return CreateGridGainClasspath(usrCp, home, forceTest);
+ return CreateIgniteClasspath(usrCp, home, forceTest);
}
- std::string CreateGridGainClasspath(const std::string* usrCp, const std::string* home, bool forceTest)
+ std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool forceTest)
{
// 1. Append user classpath if it exists.
std::string cp = std::string();
@@ -448,7 +440,7 @@ namespace ignite
// 2. Append home classpath if home is defined.
if (home)
{
- std::string homeCp = CreateGridGainHomeClasspath(*home, forceTest);
+ std::string homeCp = CreateIgniteHomeClasspath(*home, forceTest);
cp.append(homeCp);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a79962c5/modules/platform/src/main/cpp/core/src/grid_error.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/grid_error.cpp b/modules/platform/src/main/cpp/core/src/grid_error.cpp
index 597853a..e9d075e 100644
--- a/modules/platform/src/main/cpp/core/src/grid_error.cpp
+++ b/modules/platform/src/main/cpp/core/src/grid_error.cpp
@@ -106,7 +106,7 @@ namespace ignite
{
std::stringstream stream;
- stream << "Java class is not found (did you set GRIDGAIN_HOME environment variable?)";
+ stream << "Java class is not found (did you set IGNITE_HOME environment variable?)";
if (jniMsg)
stream << ": " << jniMsg;
@@ -117,7 +117,7 @@ namespace ignite
{
std::stringstream stream;
- stream << "Java method is not found (did you set GRIDGAIN_HOME environment variable?)";
+ stream << "Java method is not found (did you set IGNITE_HOME environment variable?)";
if (jniMsg)
stream << ": " << jniMsg;
http://git-wip-us.apache.org/repos/asf/ignite/blob/a79962c5/modules/platform/src/main/cpp/core/src/grid_factory.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/grid_factory.cpp b/modules/platform/src/main/cpp/core/src/grid_factory.cpp
index cfdd6b7..8fa6d26 100644
--- a/modules/platform/src/main/cpp/core/src/grid_factory.cpp
+++ b/modules/platform/src/main/cpp/core/src/grid_factory.cpp
@@ -87,7 +87,7 @@ namespace ignite
// 2. Set home.
if (home) {
- std::string homeFull = std::string("-DGRIDGAIN_HOME=") + *home;
+ std::string homeFull = std::string("-DIGNITE_HOME=") + *home;
*(opts + idx++) = CopyChars(homeFull.c_str());
}
@@ -178,18 +178,18 @@ namespace ignite
if (!failed)
{
- // 2. Resolve GRIDGAIN_HOME.
+ // 2. Resolve IGNITE_HOME.
bool homeFound;
std::string home;
- if (cfg.gridGainHome)
+ if (cfg.igniteHome)
{
- std::string homePath = std::string(cfg.gridGainHome);
+ std::string homePath = std::string(cfg.igniteHome);
- home = ResolveGridGainHome(&homePath, &homeFound);
+ home = ResolveIgniteHome(&homePath, &homeFound);
}
else
- home = ResolveGridGainHome(NULL, &homeFound);
+ home = ResolveIgniteHome(NULL, &homeFound);
// 3. Create classpath.
std::string cp;
@@ -198,10 +198,10 @@ namespace ignite
{
std::string usrCp = cfg.jvmClassPath;
- cp = CreateGridGainClasspath(&usrCp, homeFound ? &home : NULL);
+ cp = CreateIgniteClasspath(&usrCp, homeFound ? &home : NULL);
}
else
- cp = CreateGridGainClasspath(NULL, homeFound ? &home : NULL);
+ cp = CreateIgniteClasspath(NULL, homeFound ? &home : NULL);
if (!cp.empty())
{
@@ -265,7 +265,7 @@ namespace ignite
}
else {
*err = GridError(GridError::IGNITE_ERR_JVM_NO_CLASSPATH,
- "Java classpath is empty (did you set GRIDGAIN_HOME environment variable?)");
+ "Java classpath is empty (did you set IGNITE_HOME environment variable?)");
failed = true;
}