Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ void stop() {

/** */
void onDisconnected() {
cancelFutures(MetadataUpdateResult.createFailureResult(
new BinaryObjectException("Failed to update or wait for metadata, client node disconnected")));
cancelFutures(MetadataUpdateResult.createFailureResult("Failed to update or wait for metadata, client node disconnected"));
}

/**
Expand Down Expand Up @@ -945,7 +944,7 @@ private final class MetadataRemoveProposedListener implements CustomEventListene

if (msg.rejected()) {
if (fut != null)
fut.onDone(MetadataUpdateResult.createFailureResult(msg.rejectionError()));
fut.onDone(MetadataUpdateResult.createFailureResult(msg.rejectionErrorMessage()));
}
else {
if (fut != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.concurrent.atomic.AtomicReference;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.GridTopic;
Expand Down Expand Up @@ -124,9 +123,7 @@ void requestMetadata() {

if (noSrvsInCluster)
onDone(MetadataUpdateResult.createFailureResult(
new BinaryObjectException(
"All server nodes have left grid, cannot request metadata [typeId: "
+ typeId + "]")));
"All server nodes have left grid, cannot request metadata [typeId: " + typeId + "]"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.apache.ignite.internal.processors.cache.binary;

import java.util.UUID;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.internal.Order;
import org.apache.ignite.internal.binary.BinaryMetadata;
import org.apache.ignite.internal.managers.discovery.DiscoCache;
Expand Down Expand Up @@ -116,8 +115,8 @@ boolean rejected() {
}

/** */
BinaryObjectException rejectionError() {
return new BinaryObjectException(errMsg);
String rejectionErrorMessage() {
return errMsg;
}

/** */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ static MetadataUpdateResult createSuccessfulResult(int typeVer) {
return new MetadataUpdateResult(ResultType.SUCCESS, null, typeVer);
}

/**
* @param errMsg Error message lead to request failure.
*/
static MetadataUpdateResult createFailureResult(String errMsg) {
return createFailureResult(new BinaryObjectException(errMsg));
}

/**
* @param err Error lead to request failure.
*/
Expand Down
Loading