You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/09/15 11:39:40 UTC
[1/4] ignite git commit: IGNITE-1477: Fixed.
Repository: ignite
Updated Branches:
refs/heads/ignite-971 f4bf64d46 -> 7a89c5103
IGNITE-1477: Fixed.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c0e1ac18
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c0e1ac18
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c0e1ac18
Branch: refs/heads/ignite-971
Commit: c0e1ac1842df19a4de83dbbcc99090b43371c913
Parents: c065512
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 15 10:25:09 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 15 10:25:09 2015 +0300
----------------------------------------------------------------------
.../hadoop/igfs/HadoopIgfsWrapper.java | 94 +++++++++++---------
1 file changed, 53 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c0e1ac18/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
index abbb142..01189f7 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
@@ -35,6 +35,7 @@ import org.apache.ignite.internal.processors.igfs.IgfsHandshakeResponse;
import org.apache.ignite.internal.processors.igfs.IgfsStatus;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.G;
+import org.apache.ignite.internal.util.typedef.internal.SB;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.jetbrains.annotations.Nullable;
@@ -339,7 +340,9 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
* @return Delegate.
*/
private Delegate delegate() throws HadoopIgfsCommunicationException {
- Exception err = null;
+ // These fields will contain possible exceptions from shmem and TCP endpoints.
+ Exception errShmem = null;
+ Exception errTcp = null;
// 1. If delegate is set, return it immediately.
Delegate curDelegate = delegateRef.get();
@@ -357,8 +360,8 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
igfs = (IgfsEx)ignite.fileSystem(endpoint.igfs());
}
- catch (Exception e) {
- err = e;
+ catch (Exception ignore) {
+ // No-op.
}
}
else {
@@ -368,8 +371,8 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
break;
}
- catch (Exception e) {
- err = e;
+ catch (Exception ignore) {
+ // No-op.
}
}
}
@@ -388,57 +391,54 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
hadoop.close(true);
if (log.isDebugEnabled())
- log.debug("Failed to connect to in-proc IGFS, fallback to IPC mode.", e);
-
- err = e;
+ log.debug("Failed to connect to in-process IGFS, fallback to IPC mode.", e);
}
}
}
// 3. Try connecting using shmem.
- if (!parameter(conf, PARAM_IGFS_ENDPOINT_NO_LOCAL_SHMEM, authority, false)) {
- if (curDelegate == null && !U.isWindows()) {
- HadoopIgfsEx hadoop = null;
+ boolean skipLocShmem = parameter(conf, PARAM_IGFS_ENDPOINT_NO_LOCAL_SHMEM, authority, false);
- try {
- hadoop = new HadoopIgfsOutProc(endpoint.port(), endpoint.grid(), endpoint.igfs(), log, userName);
+ if (curDelegate == null && !skipLocShmem && !U.isWindows()) {
+ HadoopIgfsEx hadoop = null;
- curDelegate = new Delegate(hadoop, hadoop.handshake(logDir));
- }
- catch (IOException | IgniteCheckedException e) {
- if (e instanceof HadoopIgfsCommunicationException)
- hadoop.close(true);
+ try {
+ hadoop = new HadoopIgfsOutProc(endpoint.port(), endpoint.grid(), endpoint.igfs(), log, userName);
- if (log.isDebugEnabled())
- log.debug("Failed to connect to out-proc local IGFS using shmem.", e);
+ curDelegate = new Delegate(hadoop, hadoop.handshake(logDir));
+ }
+ catch (IOException | IgniteCheckedException e) {
+ if (e instanceof HadoopIgfsCommunicationException)
+ hadoop.close(true);
- err = e;
- }
+ if (log.isDebugEnabled())
+ log.debug("Failed to connect to IGFS using shared memory [port=" + endpoint.port() + ']', e);
+
+ errShmem = e;
}
}
// 4. Try local TCP connection.
boolean skipLocTcp = parameter(conf, PARAM_IGFS_ENDPOINT_NO_LOCAL_TCP, authority, false);
- if (!skipLocTcp) {
- if (curDelegate == null) {
- HadoopIgfsEx hadoop = null;
+ if (curDelegate == null && !skipLocTcp) {
+ HadoopIgfsEx hadoop = null;
- try {
- hadoop = new HadoopIgfsOutProc(LOCALHOST, endpoint.port(), endpoint.grid(), endpoint.igfs(),
- log, userName);
+ try {
+ hadoop = new HadoopIgfsOutProc(LOCALHOST, endpoint.port(), endpoint.grid(), endpoint.igfs(),
+ log, userName);
- curDelegate = new Delegate(hadoop, hadoop.handshake(logDir));
- }
- catch (IOException | IgniteCheckedException e) {
- if (e instanceof HadoopIgfsCommunicationException)
- hadoop.close(true);
+ curDelegate = new Delegate(hadoop, hadoop.handshake(logDir));
+ }
+ catch (IOException | IgniteCheckedException e) {
+ if (e instanceof HadoopIgfsCommunicationException)
+ hadoop.close(true);
- if (log.isDebugEnabled())
- log.debug("Failed to connect to out-proc local IGFS using TCP.", e);
+ if (log.isDebugEnabled())
+ log.debug("Failed to connect to IGFS using TCP [host=" + endpoint.host() +
+ ", port=" + endpoint.port() + ']', e);
- err = e;
- }
+ errTcp = e;
}
}
@@ -457,9 +457,10 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
hadoop.close(true);
if (log.isDebugEnabled())
- log.debug("Failed to connect to out-proc remote IGFS using TCP.", e);
+ log.debug("Failed to connect to IGFS using TCP [host=" + endpoint.host() +
+ ", port=" + endpoint.port() + ']', e);
- err = e;
+ errTcp = e;
}
}
@@ -469,8 +470,19 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
return curDelegate;
}
- else
- throw new HadoopIgfsCommunicationException("Failed to connect to IGFS: " + endpoint, err);
+ else {
+ SB errMsg = new SB("Failed to connect to IGFS [endpoint=" + authority + ", attempts=[");
+
+ if (errShmem != null)
+ errMsg.a("[type=SHMEM, port=" + endpoint.port() + ", err=" + errShmem + "], ");
+
+ errMsg.a("[type=TCP, host=" + endpoint.host() + ", port=" + endpoint.port() + ", err=" + errTcp + "]] ");
+
+ errMsg.a("(ensure that IGFS is running and have IPC endpoint enabled; ensure that " +
+ "ignite-shmem-1.0.0.jar is in Hadoop classpath if you use shared memory endpoint).");
+
+ throw new HadoopIgfsCommunicationException(errMsg.toString());
+ }
}
/**
[4/4] ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1.4' into ignite-971
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.4' into ignite-971
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7a89c510
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7a89c510
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7a89c510
Branch: refs/heads/ignite-971
Commit: 7a89c510362d7320a08fbf920a9827b6348b7fe3
Parents: f4bf64d eb7d2b0
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 15 12:39:26 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 15 12:39:26 2015 +0300
----------------------------------------------------------------------
.../internal/portable/api/IgnitePortables.java | 2 +-
.../hadoop/igfs/HadoopIgfsWrapper.java | 100 +++++++++++--------
2 files changed, 58 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
[2/4] ignite git commit: IGNITE-1477: Fixed.
Posted by sb...@apache.org.
IGNITE-1477: Fixed.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dc44a2a7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dc44a2a7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dc44a2a7
Branch: refs/heads/ignite-971
Commit: dc44a2a78ce90f5fcab82c0b39d6888724778181
Parents: c0e1ac1
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 15 10:42:15 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 15 10:42:15 2015 +0300
----------------------------------------------------------------------
.../internal/processors/hadoop/igfs/HadoopIgfsWrapper.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/dc44a2a7/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
index 01189f7..857db71 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsWrapper.java
@@ -79,7 +79,7 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
* @param log Current logger.
*/
public HadoopIgfsWrapper(String authority, String logDir, Configuration conf, Log log, String user)
- throws IOException {
+ throws IOException {
try {
this.authority = authority;
this.endpoint = new HadoopIgfsEndpoint(authority);
@@ -351,7 +351,9 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
return curDelegate;
// 2. Guess that we are in the same VM.
- if (!parameter(conf, PARAM_IGFS_ENDPOINT_NO_EMBED, authority, false)) {
+ boolean skipInProc = parameter(conf, PARAM_IGFS_ENDPOINT_NO_EMBED, authority, false);
+
+ if (!skipInProc) {
IgfsEx igfs = null;
if (endpoint.grid() == null) {
@@ -471,7 +473,7 @@ public class HadoopIgfsWrapper implements HadoopIgfs {
return curDelegate;
}
else {
- SB errMsg = new SB("Failed to connect to IGFS [endpoint=" + authority + ", attempts=[");
+ SB errMsg = new SB("Failed to connect to IGFS [endpoint=igfs://" + authority + ", attempts=[");
if (errShmem != null)
errMsg.a("[type=SHMEM, port=" + endpoint.port() + ", err=" + errShmem + "], ");
[3/4] ignite git commit: removed link to
IgniteCache.withKeepPortable() method in documentation
Posted by sb...@apache.org.
removed link to IgniteCache.withKeepPortable() method in documentation
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/eb7d2b0b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/eb7d2b0b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/eb7d2b0b
Branch: refs/heads/ignite-971
Commit: eb7d2b0b1fe88ce82af43f3bcb7420f2bfcfb638
Parents: dc44a2a
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Sep 15 12:25:41 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Sep 15 12:25:41 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/portable/api/IgnitePortables.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb7d2b0b/modules/core/src/main/java/org/apache/ignite/internal/portable/api/IgnitePortables.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/api/IgnitePortables.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/api/IgnitePortables.java
index 56f3768..6a534e9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/api/IgnitePortables.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/api/IgnitePortables.java
@@ -51,7 +51,7 @@ import org.jetbrains.annotations.Nullable;
* (assuming that class definitions are present in the classpath).
* <p>
* To work with the portable format directly, user should create a special cache projection
- * using {@link IgniteCache#withKeepPortable()} method and then retrieve individual fields as needed:
+ * using IgniteCache.withKeepPortable() method and then retrieve individual fields as needed:
* <pre name=code class=java>
* IgniteCache<PortableObject, PortableObject> prj = cache.withKeepPortable();
*