use of org.apache.ignite.lang.IgniteUuid in project ignite by apache.
the class BinaryMarshallerSelfTest method testIgniteUuid.
/**
* @throws Exception If failed.
*/
public void testIgniteUuid() throws Exception {
IgniteUuid uuid = IgniteUuid.randomUuid();
assertEquals(uuid, marshalUnmarshal(uuid));
}
use of org.apache.ignite.lang.IgniteUuid in project ignite by apache.
the class IgfsUtils method readListingEntry.
/**
* Read listing entry.
*
* @param in Reader.
* @return Entry.
*/
@Nullable
public static IgfsListingEntry readListingEntry(BinaryRawReader in) {
if (in.readBoolean()) {
IgniteUuid id = BinaryUtils.readIgniteUuid(in);
boolean dir = in.readBoolean();
return new IgfsListingEntry(id, dir);
} else
return null;
}
use of org.apache.ignite.lang.IgniteUuid in project ignite by apache.
the class GridRuntimeExceptionSelfTest method testMapFailed.
/**
* @throws Exception If failed.
*/
public void testMapFailed() throws Exception {
Ignite ignite = G.ignite(getTestIgniteInstanceName());
ignite.compute().localDeployTask(GridTaskFailedTestTask.class, GridTaskFailedTestTask.class.getClassLoader());
ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskFailedTestTask.class.getName(), FailType.MAP);
try {
fut.get();
assert false;
} catch (IgniteException e) {
info("Got expected grid exception: " + e);
}
IgniteUuid sesId = fut.getTaskSession().getId();
// Query for correct events.
List<Event> evts = ignite.events().remoteQuery(new TaskFailedEventFilter(sesId), 0);
assert evts.size() == 1;
info("Task failed event: " + evts.get(0));
}
use of org.apache.ignite.lang.IgniteUuid in project ignite by apache.
the class GridRuntimeExceptionSelfTest method testReduceFailed.
/**
* @throws Exception If failed.
*/
public void testReduceFailed() throws Exception {
Ignite ignite = G.ignite(getTestIgniteInstanceName());
ignite.compute().localDeployTask(GridTaskFailedTestTask.class, GridTaskFailedTestTask.class.getClassLoader());
ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskFailedTestTask.class.getName(), FailType.RESULT);
try {
fut.get();
assert false;
} catch (IgniteException e) {
info("Got expected grid exception: " + e);
}
IgniteUuid sesId = fut.getTaskSession().getId();
// Query for correct events.
List<Event> evts = ignite.events().remoteQuery(new TaskFailedEventFilter(sesId), 0);
assert evts.size() == 1;
info("Task failed event: " + evts.get(0));
}
use of org.apache.ignite.lang.IgniteUuid in project ignite by apache.
the class GridRuntimeExceptionSelfTest method testExecuteFailed.
/**
* @throws Exception If failed.
*/
public void testExecuteFailed() throws Exception {
Ignite ignite = G.ignite(getTestIgniteInstanceName());
ignite.compute().localDeployTask(GridTaskFailedTestTask.class, GridTaskFailedTestTask.class.getClassLoader());
ComputeTaskFuture<?> fut = executeAsync(ignite.compute(), GridTaskFailedTestTask.class.getName(), FailType.EXECUTE);
try {
fut.get();
assert false;
} catch (IgniteException e) {
info("Got expected grid exception: " + e);
}
IgniteUuid sesId = fut.getTaskSession().getId();
// Query for correct events.
List<Event> evts = ignite.events().remoteQuery(new TaskFailedEventFilter(sesId), 0);
info("Job failed event: " + evts.get(0));
assert evts.size() == 1;
}
Aggregations