You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by od...@apache.org on 2016/03/31 02:23:59 UTC
[06/38] incubator-hawq git commit: HAWQ-571. Fix misspellings in
libyarn
HAWQ-571. Fix misspellings in libyarn
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/fcae7b48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/fcae7b48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/fcae7b48
Branch: refs/heads/HAWQ-546
Commit: fcae7b481f3833f416157f84d9972642e21d243c
Parents: 0aca7fa
Author: Wen Lin <wl...@pivotal.io>
Authored: Tue Mar 22 14:30:07 2016 +0800
Committer: Oleksandr Diachenko <od...@pivotal.io>
Committed: Wed Mar 30 17:23:26 2016 -0700
----------------------------------------------------------------------
depends/libyarn/src/common/Exception.h | 18 ++++++------
depends/libyarn/src/common/XmlConfig.cpp | 40 +++++++++++++--------------
depends/libyarn/src/common/XmlConfig.h | 4 +--
3 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/fcae7b48/depends/libyarn/src/common/Exception.h
----------------------------------------------------------------------
diff --git a/depends/libyarn/src/common/Exception.h b/depends/libyarn/src/common/Exception.h
index cbe96b9..2f0cca9 100644
--- a/depends/libyarn/src/common/Exception.h
+++ b/depends/libyarn/src/common/Exception.h
@@ -169,36 +169,36 @@ public:
static const char * ReflexName;
};
-class YarnBadBoolFoumat: public YarnException {
+class YarnBadBoolFormat: public YarnException {
public:
- YarnBadBoolFoumat(const std::string & arg, const char * file, int line,
+ YarnBadBoolFormat(const std::string & arg, const char * file, int line,
const char * stack) :
YarnException(arg, file, line, stack) {
}
- ~YarnBadBoolFoumat() throw () {
+ ~YarnBadBoolFormat() throw () {
}
};
-class YarnBadConfigFoumat: public YarnException {
+class YarnBadConfigFormat: public YarnException {
public:
- YarnBadConfigFoumat(const std::string & arg, const char * file, int line,
+ YarnBadConfigFormat(const std::string & arg, const char * file, int line,
const char * stack) :
YarnException(arg, file, line, stack) {
}
- ~YarnBadConfigFoumat() throw () {
+ ~YarnBadConfigFormat() throw () {
}
};
-class YarnBadNumFoumat: public YarnException {
+class YarnBadNumFormat: public YarnException {
public:
- YarnBadNumFoumat(const std::string & arg, const char * file, int line,
+ YarnBadNumFormat(const std::string & arg, const char * file, int line,
const char * stack) :
YarnException(arg, file, line, stack) {
}
- ~YarnBadNumFoumat() throw () {
+ ~YarnBadNumFormat() throw () {
}
};
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/fcae7b48/depends/libyarn/src/common/XmlConfig.cpp
----------------------------------------------------------------------
diff --git a/depends/libyarn/src/common/XmlConfig.cpp b/depends/libyarn/src/common/XmlConfig.cpp
index 7ce5466..3294018 100644
--- a/depends/libyarn/src/common/XmlConfig.cpp
+++ b/depends/libyarn/src/common/XmlConfig.cpp
@@ -45,12 +45,12 @@ static int32_t StrToInt32(const char * str) {
retval = strtol(str, &end, 0);
if (EINVAL == errno || 0 != *end) {
- THROW(YarnBadNumFoumat, "Invalid int32_t type: %s", str);
+ THROW(YarnBadNumFormat, "Invalid int32_t type: %s", str);
}
if (ERANGE == errno || retval > std::numeric_limits<int32_t>::max()
|| retval < std::numeric_limits<int32_t>::min()) {
- THROW(YarnBadNumFoumat, "Underflow/Overflow int32_t type: %s", str);
+ THROW(YarnBadNumFormat, "Underflow/Overflow int32_t type: %s", str);
}
return retval;
@@ -63,12 +63,12 @@ static int64_t StrToInt64(const char * str) {
retval = strtoll(str, &end, 0);
if (EINVAL == errno || 0 != *end) {
- THROW(YarnBadNumFoumat, "Invalid int64_t type: %s", str);
+ THROW(YarnBadNumFormat, "Invalid int64_t type: %s", str);
}
if (ERANGE == errno || retval > std::numeric_limits<int64_t>::max()
|| retval < std::numeric_limits<int64_t>::min()) {
- THROW(YarnBadNumFoumat, "Underflow/Overflow int64_t type: %s", str);
+ THROW(YarnBadNumFormat, "Underflow/Overflow int64_t type: %s", str);
}
return retval;
@@ -82,7 +82,7 @@ static bool StrToBool(const char * str) {
} else if (!strcasecmp(str, "false") || !strcmp(str, "0")) {
retval = false;
} else {
- THROW(YarnBadBoolFoumat, "Invalid bool type: %s", str);
+ THROW(YarnBadBoolFormat, "Invalid bool type: %s", str);
}
return retval;
@@ -95,12 +95,12 @@ static double StrToDouble(const char * str) {
retval = strtod(str, &end);
if (EINVAL == errno || 0 != *end) {
- THROW(YarnBadNumFoumat, "Invalid double type: %s", str);
+ THROW(YarnBadNumFormat, "Invalid double type: %s", str);
}
if (ERANGE == errno || retval > std::numeric_limits<double>::max()
|| retval < std::numeric_limits<double>::min()) {
- THROW(YarnBadNumFoumat, "Underflow/Overflow int64_t type: %s", str);
+ THROW(YarnBadNumFormat, "Underflow/Overflow int64_t type: %s", str);
}
return retval;
@@ -142,7 +142,7 @@ static void readConfigItem(xmlNodePtr root, Map & kv, const char * path) {
return;
}
- THROW(YarnBadConfigFoumat, "Config cannot parse configure file: \"%s\"",
+ THROW(YarnBadConfigFormat, "Config cannot parse configure file: \"%s\"",
path);
}
@@ -151,7 +151,7 @@ static void readConfigItems(xmlDocPtr doc, Map & kv, const char * path) {
root = xmlDocGetRootElement(doc);
if (NULL == root || strcmp((const char *) root->name, "configuration")) {
- THROW(YarnBadConfigFoumat, "Config cannot parse configure file: \"%s\"",
+ THROW(YarnBadConfigFormat, "Config cannot parse configure file: \"%s\"",
path);
}
@@ -164,7 +164,7 @@ static void readConfigItems(xmlDocPtr doc, Map & kv, const char * path) {
}
if (strcmp((const char *) curNode->name, "property")) {
- THROW(YarnBadConfigFoumat,
+ THROW(YarnBadConfigFormat,
"Config cannot parse configure file: \"%s\"", path);
}
@@ -186,7 +186,7 @@ void Config::update(const char * p) {
if (access(path.c_str(), R_OK)) {
strerror_r(errno, msg, sizeof(msg));
- THROW(YarnBadConfigFoumat, "Cannot read configure file: \"%s\", %s",
+ THROW(YarnBadConfigFormat, "Cannot read configure file: \"%s\", %s",
path.c_str(), msg);
}
@@ -196,7 +196,7 @@ void Config::update(const char * p) {
try {
/* check if parsing succeeded */
if (doc == NULL) {
- THROW(YarnBadConfigFoumat,
+ THROW(YarnBadConfigFormat,
"Config cannot parse configure file: \"%s\"", path.c_str());
} else {
readConfigItems(doc, kv, path.c_str());
@@ -248,7 +248,7 @@ int64_t Config::getInt64(const char * key) const {
try {
retval = StrToInt64(it->second.c_str());
- } catch (const YarnBadNumFoumat & e) {
+ } catch (const YarnBadNumFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
@@ -265,7 +265,7 @@ int64_t Config::getInt64(const char * key, int64_t def) const {
try {
retval = StrToInt64(it->second.c_str());
- } catch (const YarnBadNumFoumat & e) {
+ } catch (const YarnBadNumFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
@@ -282,7 +282,7 @@ int32_t Config::getInt32(const char * key) const {
try {
retval = StrToInt32(it->second.c_str());
- } catch (const YarnBadNumFoumat & e) {
+ } catch (const YarnBadNumFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
@@ -299,7 +299,7 @@ int32_t Config::getInt32(const char * key, int32_t def) const {
try {
retval = StrToInt32(it->second.c_str());
- } catch (const YarnBadNumFoumat & e) {
+ } catch (const YarnBadNumFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
@@ -316,7 +316,7 @@ double Config::getDouble(const char * key) const {
try {
retval = StrToDouble(it->second.c_str());
- } catch (const YarnBadNumFoumat & e) {
+ } catch (const YarnBadNumFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
@@ -333,7 +333,7 @@ double Config::getDouble(const char * key, double def) const {
try {
retval = StrToDouble(it->second.c_str());
- } catch (const YarnBadNumFoumat & e) {
+ } catch (const YarnBadNumFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
@@ -350,7 +350,7 @@ bool Config::getBool(const char * key) const {
try {
retval = StrToBool(it->second.c_str());
- } catch (const YarnBadBoolFoumat & e) {
+ } catch (const YarnBadBoolFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
@@ -367,7 +367,7 @@ bool Config::getBool(const char * key, bool def) const {
try {
retval = StrToBool(it->second.c_str());
- } catch (const YarnBadNumFoumat & e) {
+ } catch (const YarnBadNumFormat & e) {
NESTED_THROW(YarnConfigNotFound, "Config key: %s not found", key);
}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/fcae7b48/depends/libyarn/src/common/XmlConfig.h
----------------------------------------------------------------------
diff --git a/depends/libyarn/src/common/XmlConfig.h b/depends/libyarn/src/common/XmlConfig.h
index 0904ef9..91fed50 100644
--- a/depends/libyarn/src/common/XmlConfig.h
+++ b/depends/libyarn/src/common/XmlConfig.h
@@ -41,13 +41,13 @@ public:
/**
* Construct a Config with given configure file.
* @param path The path of configure file.
- * @throw HdfsBadConfigFoumat
+ * @throw YarnBadConfigFormat
*/
Config(const char * path);
/**
* Parse the configure file.
- * @throw HdfsBadConfigFoumat
+ * @throw YarnBadConfigFormat
*/
void update(const char * path);