Examples of create()


Examples of org.apache.ambari.server.orm.dao.ViewDAO.create()

    expect(fileEntry.toURI()).andReturn(new URI("file:./"));

    Capture<ViewEntity> captureViewEntity = new Capture<ViewEntity>();

    expect(vDAO.findAll()).andReturn(Collections.<ViewEntity>emptyList());
    vDAO.create(capture(captureViewEntity));

    // replay mocks
    replay(configuration, viewDir, extractedArchiveDir, viewArchive, archiveDir, entryFile, classesDir,
        libDir, fileEntry, viewJarFile, enumeration, jarEntry, is, fos, vDAO);

Examples of org.apache.ambari.view.pig.utils.HdfsApi.create()

    expect(hdfsApi.copy(eq("/tmp/script.pig"), startsWith("/tmp/.pigjobs/"))).andReturn(true);

    ByteArrayOutputStream do_stream = new ByteArrayOutputStream();

    FSDataOutputStream stream = new FSDataOutputStream(do_stream);
    expect(hdfsApi.create(anyString(), eq(true))).andReturn(stream);
    replay(hdfsApi);
    JobService.setHdfsApi(hdfsApi);

    TempletonApi api = createNiceMock(TempletonApi.class);
    jobService.getResourceManager().setTempletonApi(api);

Examples of org.apache.aries.blueprint.container.BlueprintRepository.create()

   
    public void testCircular() throws Exception {
        BlueprintRepository repository = createBlueprintContainer().getRepository();

        // this should pass (we allow circular dependencies for components without init method)
        Object obj1 = repository.create("a");
               
        // test service and listener circular dependencies
        Object obj2 = repository.create("service");
        assertNotNull(obj2);
        assertTrue(obj2 instanceof ServiceRegistration);

Examples of org.apache.aries.blueprint.di.Recipe.create()

            for (Map.Entry<String, Recipe> entry : graph.getSortedRecipes(names).entrySet()) {
                String name = entry.getKey();
                Object object = instances.get(name);
                if (object == null) {
                    Recipe recipe = entry.getValue();
                    object = recipe.create();
                }
                objects.put(name, object);
            }
            return objects;
        }

Examples of org.apache.aries.blueprint.di.Repository.create()

        String name = recipe.getName();
        Repository repo = blueprintContainer.getRepository();
        if (repo.getRecipe(name) != recipe) {
            repo.putRecipe(name, recipe);
        }
        return repo.create(name);
    }
   
    private String getComponentName() {
        if (metadata.getServiceComponent() instanceof RefMetadata) {
            RefMetadata ref = (RefMetadata) metadata.getServiceComponent();

Examples of org.apache.avalon.fortress.impl.extensions.InstrumentableCreator.create()

    public void testNoInstrumentManager() throws Exception
    {
        Creator creator = new InstrumentableCreator( null );

        creator.create( m_instrumentable, m_context );
        creator.destroy( m_instrumentable, m_context );
    }

    public void testInstrumentManager() throws Exception
    {

Examples of org.apache.avalon.lifecycle.Creator.create()

    public void testNoInstrumentManager() throws Exception
    {
        Creator creator = new InstrumentableCreator( null );

        creator.create( m_instrumentable, m_context );
        creator.destroy( m_instrumentable, m_context );
    }

    public void testInstrumentManager() throws Exception
    {

Examples of org.apache.avalon.repository.provider.Factory.create()

        }

        Factory factory = context.getInitialFactory();
        assertNotNull( factory );

        CacheManager manager = (CacheManager) factory.create() ;
        assertNotNull( manager ) ;
  
        Repository repository = manager.createRepository() ;
        assertNotNull( repository ) ;
       

Examples of org.apache.avro.file.DataFileWriter.create()

    if (avroType == null) {
      throw new IllegalStateException("Can't write a non-typed Avro collection");
    }
    DatumWriter datumWriter = Avros.newWriter((AvroType)recordCollection.getPType());
    DataFileWriter dataFileWriter = new DataFileWriter(datumWriter);
    dataFileWriter.create(avroType.getSchema(), outputStream);

    for (Object record : recordCollection.materialize()) {
      dataFileWriter.append(avroType.getOutputMapFn().map(record));
    }

Examples of org.apache.avro.hadoop.io.AvroDatumConverterFactory.create()

    TaskAttemptContext context = createMock(TaskAttemptContext.class);

    replay(context);

    AvroDatumConverterFactory factory = new AvroDatumConverterFactory(job.getConfiguration());
    AvroDatumConverter<Text, ?> keyConverter = factory.create(Text.class);
    AvroValue<TextStats> avroValue = new AvroValue<TextStats>(null);
    @SuppressWarnings("unchecked")
    AvroDatumConverter<AvroValue<TextStats>, ?> valueConverter
        = factory.create((Class<AvroValue<TextStats>>) avroValue.getClass());
    CodecFactory compressionCodec = CodecFactory.nullCodec();
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.