本文整理汇总了Java中org.apache.reef.tang.formats.AvroConfigurationSerializer类的典型用法代码示例。如果您正苦于以下问题:Java AvroConfigurationSerializer类的具体用法?Java AvroConfigurationSerializer怎么用?Java AvroConfigurationSerializer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AvroConfigurationSerializer类属于org.apache.reef.tang.formats包,在下文中一共展示了AvroConfigurationSerializer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
public static void main(final String[] args) throws Exception {
final Tang tang = Tang.Factory.getTang();
final JavaConfigurationBuilder cb = tang.newConfigurationBuilder();
final CommandLine cl = new CommandLine(cb);
cl.registerShortNameOfClass(Timer.Seconds.class);
cl.processCommandLine(args);
final Configuration conf = cb.build();
System.out.println("start conf");
final AvroConfigurationSerializer avroSerializer = new AvroConfigurationSerializer();
System.out.println(avroSerializer.toString(conf));
System.out.println("end conf");
final InjectorImpl injector = (InjectorImpl) tang.newInjector(conf);
final InjectionPlan<Timer> ip = injector.getInjectionPlan(Timer.class);
System.out.println(ip.toPrettyString());
System.out.println("Number of plans:" + ip.getNumAlternatives());
final Timer timer = injector.getInstance(Timer.class);
System.out.println("Tick...");
timer.sleep();
System.out.println("Tock.");
}
示例2: testLegacyConstructor
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
@Test
public void testLegacyConstructor() throws BindException, InjectionException, IOException {
final JavaConfigurationBuilder cb = tang.newConfigurationBuilder();
cb.registerLegacyConstructor(
ReflectionUtilities.getFullName(LegacyConstructor.class),
ReflectionUtilities.getFullName(Integer.class),
ReflectionUtilities.getFullName(String.class));
cb.bind(LegacyConstructor.class, LegacyConstructor.class);
final AvroConfigurationSerializer avroSerializer = new AvroConfigurationSerializer();
final String confString = avroSerializer.toString(cb.build());
final JavaConfigurationBuilder cb2 = tang.newConfigurationBuilder();
avroSerializer.configurationBuilderFromString(confString, cb2);
final Injector i = tang.newInjector(cb2.build());
i.bindVolatileInstance(Integer.class, 42);
i.bindVolatileInstance(String.class, "The meaning of life is ");
final LegacyConstructor l = i.getInstance(LegacyConstructor.class);
Assert.assertEquals(new Integer(42), l.x);
Assert.assertEquals("The meaning of life is ", l.y);
}
示例3: testStringInjectRoundTrip
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
@Test
public void testStringInjectRoundTrip() throws InjectionException, BindException, IOException {
final JavaConfigurationBuilder cb = Tang.Factory.getTang().newConfigurationBuilder();
cb.bindSetEntry(SetOfStrings.class, "four");
cb.bindSetEntry(SetOfStrings.class, "five");
cb.bindSetEntry(SetOfStrings.class, "six");
final ConfigurationSerializer serializer = new AvroConfigurationSerializer();
final String s = serializer.toString(cb.build());
final JavaConfigurationBuilder cb2 = Tang.Factory.getTang().newConfigurationBuilder();
final Configuration conf = serializer.fromString(s);
cb2.addConfiguration(conf);
final Set<String> actual = Tang.Factory.getTang().newInjector(cb2.build()).getInstance(Box.class).getStrings();
final Set<String> expected = new HashSet<>();
expected.add("four");
expected.add("five");
expected.add("six");
Assert.assertEquals(expected, actual);
}
示例4: testObjectInjectRoundTrip
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
@Test
public void testObjectInjectRoundTrip() throws InjectionException, BindException, IOException {
final JavaConfigurationBuilder cb = Tang.Factory.getTang().newConfigurationBuilder();
cb.bindSetEntry(SetOfClasses.class, Short.class);
cb.bindSetEntry(SetOfClasses.class, Float.class);
final ConfigurationSerializer serializer = new AvroConfigurationSerializer();
final String s = serializer.toString(cb.build());
final JavaConfigurationBuilder cb2 = Tang.Factory.getTang().newConfigurationBuilder();
final Configuration conf = serializer.fromString(s);
cb2.addConfiguration(conf);
final Injector i = Tang.Factory.getTang().newInjector(cb2.build());
i.bindVolatileInstance(Short.class, (short) 4);
i.bindVolatileInstance(Float.class, 42.0001f);
final Set<Number> actual = i.getInstance(Pool.class).getNumbers();
final Set<Number> expected = new HashSet<>();
expected.add((short) 4);
expected.add(42.0001f);
Assert.assertEquals(expected, actual);
}
示例5: getDriverConfiguration
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
private static Configuration getDriverConfiguration(final String jobName,
final int driverMemSize,
final String chkpCommitPath,
final String chkpTempPath,
final Configuration serverConf,
final Configuration workerConf,
final Configuration userParamConf) {
final Configuration driverConf = DriverConfiguration.CONF
.set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(CruisePSDriver.class))
.set(DriverConfiguration.DRIVER_IDENTIFIER, jobName)
.set(DriverConfiguration.DRIVER_MEMORY, driverMemSize)
.set(DriverConfiguration.ON_DRIVER_STARTED, CruisePSDriver.StartHandler.class)
.set(DriverConfiguration.ON_EVALUATOR_FAILED, CruisePSDriver.FailedEvaluatorHandler.class)
.set(DriverConfiguration.ON_CONTEXT_FAILED, CruisePSDriver.FailedContextHandler.class)
.set(DriverConfiguration.ON_TASK_FAILED, CruisePSDriver.FailedTaskHandler.class)
.set(DriverConfiguration.PROGRESS_PROVIDER, ProgressTracker.class)
.build();
final Configuration etMasterConfiguration = ETDriverConfiguration.CONF
.set(ETDriverConfiguration.TASKLET_CUSTOM_MSG_HANDLER, DriverSideMsgHandler.class)
.set(ETDriverConfiguration.CHKP_COMMIT_PATH, chkpCommitPath)
.set(ETDriverConfiguration.CHKP_TEMP_PATH, chkpTempPath)
.build();
final Configuration metricServiceConf = MetricServiceDriverConf.CONF
.set(MetricServiceDriverConf.METRIC_RECEIVER_IMPL, CruisePSMetricReceiver.class)
.build();
final ConfigurationSerializer confSerializer = new AvroConfigurationSerializer();
return Configurations.merge(driverConf, etMasterConfiguration, metricServiceConf, getNCSConfiguration(),
Tang.Factory.getTang().newConfigurationBuilder()
.bindNamedParameter(SerializedServerConf.class, confSerializer.toString(serverConf))
.bindNamedParameter(SerializedWorkerConf.class, confSerializer.toString(workerConf))
.bindNamedParameter(SerializedParamConf.class, confSerializer.toString(userParamConf))
.build());
}
示例6: getDriverConfiguration
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
/**
* Configuration for REEF driver when using Cent Comm Service.
* Binds NetworkConnectionService registration handlers.
* @return configuration that should be submitted with a DriverConfiguration
*/
// TODO #352: After REEF-402 is resolved, we should use {@code JavaConfigurationBuilder.bindList()} to bind handlers.
public Configuration getDriverConfiguration() {
final ConfigurationSerializer confSerializer = new AvroConfigurationSerializer();
final JavaConfigurationBuilder commonConfBuilder = Tang.Factory.getTang().newConfigurationBuilder();
final JavaConfigurationBuilder driverConfBuilder = Tang.Factory.getTang().newConfigurationBuilder()
.bindSetEntry(DriverStartHandler.class, NetworkDriverRegister.RegisterDriverHandler.class);
final JavaConfigurationBuilder slaveConfBuilder = Tang.Factory.getTang().newConfigurationBuilder();
// To match clients' name and handlers, encode the class names of handlers and the client name
// using delimiter "//" which cannot be included in Java class name.
for (int i = 0; i < centCommClientNames.size(); i++) {
commonConfBuilder.bindSetEntry(CentCommClientInfo.class,
String.format("%s//%s//%s",
centCommClientNames.get(i),
masterSideMsgHandlers.get(i).getName(),
slaveSideMsgHandlers.get(i).getName()));
driverConfBuilder.bindSetEntry(CentCommClientHandlers.class, masterSideMsgHandlers.get(i));
slaveConfBuilder.bindSetEntry(CentCommClientHandlers.class, slaveSideMsgHandlers.get(i));
}
final Configuration commonConf = commonConfBuilder.build();
final String serializedSlaveConf
= confSerializer.toString(Configurations.merge(commonConf, slaveConfBuilder.build()));
driverConfBuilder.bindNamedParameter(SerializedCentCommSlavesConf.class, serializedSlaveConf);
return Configurations.merge(commonConf, driverConfBuilder.build());
}
示例7: testRam
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
@Test
public void testRam() throws BindException, InjectionException, ServiceException, IOException {
final Tang t = Tang.Factory.getTang();
final ConfigurationBuilder configurationBuilderOne = t.newConfigurationBuilder(RamConf.CONF.build());
final AvroConfigurationSerializer avroSerializer = new AvroConfigurationSerializer();
final String serializedConfiguration = avroSerializer.toString(configurationBuilderOne.build());
final ConfigurationBuilder configurationBuilderTwo =
t.newConfigurationBuilder(avroSerializer.fromString(serializedConfiguration));
@SuppressWarnings("unchecked")
final Spool<Integer> f = (Spool<Integer>) t.newInjector(configurationBuilderTwo.build()).getInstance(
Spool.class);
test(f);
}
示例8: LocalRuntimeDriverConfigurationGenerator
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
@Inject
private LocalRuntimeDriverConfigurationGenerator(final AvroConfigurationSerializer configurationSerializer,
final REEFFileNames fileNames,
final DriverConfigurationProvider driverConfigurationProvider,
@Parameter(DriverConfigurationProviders.class)
final Set<ConfigurationProvider> configurationProviders){
this.fileNames = fileNames;
this.driverConfigurationProvider = driverConfigurationProvider;
this.configurationProviders = configurationProviders;
this.configurationSerializer = configurationSerializer;
}
示例9: createRuntimeDefinition
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
private static AvroRuntimeDefinition createRuntimeDefinition(final Configuration configModule,
final String runtimeName) {
final Configuration localDriverConfiguration = configModule;
final AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
final String serializedConfig = serializer.toString(localDriverConfiguration);
return new AvroRuntimeDefinition(runtimeName, serializedConfig);
}
示例10: initialize
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
/**
* Initializes the configured runtimes.
*/
private synchronized void initialize() {
if (this.runtimes != null) {
return;
}
this.runtimes = new HashMap<>();
for (final AvroRuntimeDefinition rd : runtimeDefinition.getRuntimes()) {
try {
// We need to create different injector for each runtime as they define conflicting bindings. Also we cannot
// fork the original injector because of the same reason.
// We create new injectors and copy form the original injector what we need.
// rootInjector is an emptyInjector that we copy bindings from the original injector into. Then we fork
// it to instantiate the actual runtime.
final Injector rootInjector = Tang.Factory.getTang().newInjector();
initializeInjector(rootInjector);
final Configuration runtimeConfig =
Tang.Factory.getTang().newConfigurationBuilder()
.bindNamedParameter(RuntimeName.class, rd.getRuntimeName().toString())
.bindImplementation(Runtime.class, RuntimeImpl.class)
.build();
final Configuration config =
new AvroConfigurationSerializer().fromString(rd.getSerializedConfiguration().toString());
final Injector runtimeInjector = rootInjector.forkInjector(config, runtimeConfig);
this.runtimes.put(rd.getRuntimeName().toString(), runtimeInjector.getInstance(Runtime.class));
} catch (final IOException | InjectionException e) {
throw new RuntimeException("Unable to initialize runtimes.", e);
}
}
}
示例11: validatePlan
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
public void validatePlan() throws IOException, BindException, InjectionException {
final Tang t = Tang.Factory.getTang();
// TODO[JIRA REEF-400] Use the AvroClassHierarchySerializer
final ClassHierarchyProto.Node root;
try (final InputStream chin = new FileInputStream(this.ch)) {
root = ClassHierarchyProto.Node.parseFrom(chin);
}
final ClassHierarchy classHierarchy = new ProtocolBufferClassHierarchy(root);
if (!inConfig.canRead()) {
throw new IOException("Cannot read input config file: " + inConfig);
}
final AvroConfigurationSerializer avroSerializer = new AvroConfigurationSerializer();
final Configuration conf = avroSerializer.fromFile(inConfig, classHierarchy);
if (target != null) {
final Injector i = t.newInjector(conf);
final InjectionPlan<?> ip = i.getInjectionPlan(target);
if (!ip.isInjectable()) {
throw new InjectionException(target + " is not injectable: " + ip.toCantInjectString());
}
}
avroSerializer.toFile(conf, outConfig);
}
示例12: testSingletonRoundTrip
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
@Test
public void testSingletonRoundTrip() throws BindException, InjectionException, IOException {
final JavaConfigurationBuilder b = Tang.Factory.getTang()
.newConfigurationBuilder();
b.bindImplementation(A.class, B.class);
final Configuration src = b.build();
final JavaConfigurationBuilder dest = Tang.Factory.getTang().newConfigurationBuilder();
final AvroConfigurationSerializer avroSerializer = new AvroConfigurationSerializer();
avroSerializer.configurationBuilderFromString(avroSerializer.toString(src), dest);
final Injector i = Tang.Factory.getTang().newInjector(dest.build());
final A a1 = i.getInstance(A.class);
final A a2 = i.getInstance(A.class);
final B b1 = i.getInstance(B.class);
assertTrue("Two singletons should be the same", a1 == a2);
assertTrue("Both instances should be of class B", a1 instanceof B);
assertTrue("Both instances should be of class B", a2 instanceof B);
assertTrue("Singleton and not singleton should be the same", a1 == b1);
final Injector injector2 = Tang.Factory.getTang().newInjector(src);
final A a3 = injector2.getInstance(A.class);
assertTrue(
"Two different injectors should return two different singletons",
a3 != a1);
final Injector injector3 = injector2.forkInjector();
final A a4 = injector3.getInstance(A.class);
assertTrue(
"Child Injectors should return the same singletons as their parents",
a3 == a4);
}
示例13: main
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
public static void main(final String[] args) {
try {
final Configuration commandLineConfig = new CommandLine()
.registerShortNameOfClass(Input.class)
.registerShortNameOfClass(Output.class)
.registerShortNameOfClass(NumPartitions.class)
.registerShortNameOfClass(MemMaster.class)
.registerShortNameOfClass(MemWorker.class)
.registerShortNameOfClass(DimD.class)
.registerShortNameOfClass(DimK.class)
.registerShortNameOfClass(DimKPrime.class)
.registerShortNameOfClass(Alpha0.class)
.registerShortNameOfClass(Rho.class)
.registerShortNameOfClass(Tolerance.class)
.registerShortNameOfClass(MaxIterations.class)
.registerShortNameOfClass(Local.class)
.processCommandLine(args)
.getBuilder().build();
final Injector injector = Tang.Factory.getTang().newInjector(commandLineConfig);
final boolean isLocal = injector.getNamedInstance(Local.class);
final String inputPath = injector.getNamedInstance(Input.class);
final String outputPath = injector.getNamedInstance(Output.class);
final int numPartitions = injector.getNamedInstance(NumPartitions.class);
final int memMaster = injector.getNamedInstance(MemMaster.class);
final int memWorker = injector.getNamedInstance(MemWorker.class);
final int dimD = injector.getNamedInstance(DimD.class);
final int dimK = injector.getNamedInstance(DimK.class);
final int dimKprime = injector.getNamedInstance(DimKPrime.class);
final double alpha0 = injector.getNamedInstance(Alpha0.class);
final double rho = injector.getNamedInstance(Rho.class);
final double tolerance = injector.getNamedInstance(Tolerance.class);
final int maxIterations = injector.getNamedInstance(MaxIterations.class);
final Configuration loaderConfig = new DataLoadingRequestBuilder()
.setInputPath(inputPath)
.renewFailedEvaluators(false)
.setInputFormatClass(SparseVectorInputFormat.class)
.setNumberOfDesiredSplits(numPartitions)
.loadIntoMemory(false)
.addComputeRequest(EvaluatorRequest.newBuilder()
.setNumber(1)
.setMemory(memMaster)
.build())
.addDataRequest(EvaluatorRequest.newBuilder()
.setNumber(numPartitions)
.setMemory(memWorker)
.build())
.setDriverConfigurationModule(DriverConfiguration.CONF
.set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(Driver.class))
.set(DriverConfiguration.DRIVER_IDENTIFIER, "TF")
.set(DriverConfiguration.ON_CONTEXT_ACTIVE, Driver.ContextActiveHandler.class)
.set(DriverConfiguration.ON_TASK_COMPLETED, Driver.TaskCompletedHandler.class))
.build();
final Configuration config = Tang.Factory.getTang()
.newConfigurationBuilder(loaderConfig, GroupCommService.getConfiguration())
.bindNamedParameter(Output.class, outputPath)
.bindNamedParameter(DimD.class, "" + dimD)
.bindNamedParameter(DimK.class, "" + dimK)
.bindNamedParameter(DimKPrime.class, "" + dimKprime)
.bindNamedParameter(Alpha0.class, "" + alpha0)
.bindNamedParameter(Rho.class, "" + rho)
.bindNamedParameter(Tolerance.class, "" + tolerance)
.bindNamedParameter(MaxIterations.class, "" + maxIterations)
.build();
LOG.log(Level.FINEST, "Driver configuration:\n--\n{0}\n--",
new AvroConfigurationSerializer().toString(config));
final LauncherStatus status = DriverLauncher.getLauncher(
getRuntimeConfiguration(isLocal)).run(config);
LOG.log(Level.INFO, "Job completed: {0}", status);
} catch (final BindException | InjectionException | IOException ex) {
LOG.log(Level.SEVERE, "Job configuration error", ex);
}
}
示例14: testLateRootTask
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
/**
* Check that the topology builds up as expected even when the root task is added after child tasks start running.
*/
@Test
public void testLateRootTask() throws InterruptedException {
final String rootTaskId = "rootTaskId";
final String[] childTaskIds = new String[]{"childTaskId1", "childTaskId2", "childTaskId3"};
final AtomicInteger numMsgs = new AtomicInteger(0);
final EStage<GroupCommunicationMessage> senderStage =
new SyncStage<>(new EventHandler<GroupCommunicationMessage>() {
@Override
public void onNext(final GroupCommunicationMessage msg) {
numMsgs.getAndIncrement();
}
});
final CommunicationGroupDriverImpl communicationGroupDriver = new CommunicationGroupDriverImpl(
GroupName.class, new AvroConfigurationSerializer(), senderStage,
new BroadcastingEventHandler<RunningTask>(), new BroadcastingEventHandler<FailedTask>(),
new BroadcastingEventHandler<FailedEvaluator>(), new BroadcastingEventHandler<GroupCommunicationMessage>(),
"DriverId", 4, 2);
communicationGroupDriver
.addBroadcast(BroadcastOperatorName.class,
BroadcastOperatorSpec.newBuilder().setSenderId(rootTaskId).build())
.addReduce(ReduceOperatorName.class,
ReduceOperatorSpec.newBuilder().setReceiverId(rootTaskId).build());
final ExecutorService pool = Executors.newFixedThreadPool(4);
final CountDownLatch countDownLatch = new CountDownLatch(4);
// first add child tasks and start them up
for (int index = 0; index < 3; index++) {
final String childId = childTaskIds[index];
pool.submit(new Runnable() {
@Override
public void run() {
final Configuration childTaskConf = TaskConfiguration.CONF
.set(TaskConfiguration.IDENTIFIER, childId)
.set(TaskConfiguration.TASK, DummyTask.class)
.build();
communicationGroupDriver.addTask(childTaskConf);
communicationGroupDriver.runTask(childId);
countDownLatch.countDown();
}
});
}
// next add the root task
pool.submit(new Runnable() {
@Override
public void run() {
try {
// purposely delay the addition of the root task
Thread.sleep(3000);
} catch (final InterruptedException e) {
throw new RuntimeException(e);
}
final Configuration rootTaskConf = TaskConfiguration.CONF
.set(TaskConfiguration.IDENTIFIER, rootTaskId)
.set(TaskConfiguration.TASK, DummyTask.class)
.build();
communicationGroupDriver.addTask(rootTaskConf);
communicationGroupDriver.runTask(rootTaskId);
countDownLatch.countDown();
}
});
pool.shutdown();
final boolean allThreadsFinished = countDownLatch.await(10, TimeUnit.SECONDS);
assertTrue("all threads finished", allThreadsFinished);
// 3 connections between 4 tasks
// 2 messages per connection
// 2 operations (broadcast & reduce)
// this gives us a total of 3*2*2 = 12 messages
assertEquals("number of messages sent from driver", 12, numMsgs.get());
}
示例15: testRoundTrip
import org.apache.reef.tang.formats.AvroConfigurationSerializer; //导入依赖的package包/类
@Test
public void testRoundTrip() throws BindException, InjectionException, IOException {
final int d = 10;
final double eps = 1e-5;
final JavaConfigurationBuilder b = Tang.Factory.getTang().newConfigurationBuilder();
b.bindNamedParameter(Dimensionality.class, String.valueOf(d));
b.bindNamedParameter(Eps.class, String.valueOf(eps));
final Configuration conf = b.build();
final Injector i1 = Tang.Factory.getTang().newInjector(conf);
final int readD1 = i1.getNamedInstance(Dimensionality.class).intValue();
final double readEps1 = i1.getNamedInstance(Eps.class).doubleValue();
assertEquals(eps, readEps1, 1e-12);
assertEquals(d, readD1);
final AvroConfigurationSerializer avroSerializer = new AvroConfigurationSerializer();
final JavaConfigurationBuilder roundTrip2 = Tang.Factory.getTang().newConfigurationBuilder();
avroSerializer.configurationBuilderFromString(avroSerializer.toString(conf), roundTrip2);
final Injector i2 = Tang.Factory.getTang().newInjector(roundTrip2.build());
final int readD2 = i2.getNamedInstance(Dimensionality.class).intValue();
final double readEps2 = i2.getNamedInstance(Eps.class).doubleValue();
assertEquals(eps, readEps2, 1e-12);
assertEquals(d, readD2);
final Injector parent3 =
Tang.Factory.getTang().newInjector(Tang.Factory.getTang().newConfigurationBuilder().build());
final Injector i3 = parent3.forkInjector(conf);
final int readD3 = i3.getNamedInstance(Dimensionality.class).intValue();
final double readEps3 = i3.getNamedInstance(Eps.class).doubleValue();
assertEquals(eps, readEps3, 1e-12);
assertEquals(d, readD3);
final Injector parent4 =
Tang.Factory.getTang().newInjector(Tang.Factory.getTang().newConfigurationBuilder().build());
final JavaConfigurationBuilder roundTrip4 = Tang.Factory.getTang().newConfigurationBuilder();
avroSerializer.configurationBuilderFromString(avroSerializer.toString(conf), roundTrip4);
final Injector i4 = parent4.forkInjector(roundTrip4.build());
final int readD4 = i4.getNamedInstance(Dimensionality.class).intValue();
final double readEps4 = i4.getNamedInstance(Eps.class).doubleValue();
assertEquals(eps, readEps4, 1e-12);
assertEquals(d, readD4);
}