Examples of initialise()


Examples of org.apache.hadoop.fs.shell.find.Replicas.initialise()

  @Test
  public void applyEquals() throws IOException {
    Replicas rep = new Replicas();
    addArgument(rep, "3");
    rep.initialise(new FindOptions());

    assertEquals(Result.FAIL, rep.apply(one));
    assertEquals(Result.FAIL, rep.apply(two));
    assertEquals(Result.PASS, rep.apply(three));
    assertEquals(Result.FAIL, rep.apply(four));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.Size.initialise()

  @Test
  public void applyEqualsBlock() throws IOException {
    Size size = new Size();
    addArgument(size, "5");
    size.initialise(new FindOptions());

    assertEquals(Result.PASS, size.apply(fiveBlocks));
    assertEquals(Result.FAIL, size.apply(sixBlocks));
    assertEquals(Result.FAIL, size.apply(fourBlocks));
    assertEquals(Result.PASS, size.apply(fiveBlocksPlus));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.Type.initialise()

  @Test
  public void testIsDirectory() throws IOException{
    Type type = new Type();
    addArgument(type, "d");
    type.initialise(new FindOptions());
   
    when(mockFstat.isDirectory()).thenReturn(true);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.PASS, type.apply(item));
View Full Code Here

Examples of org.apache.marmotta.loader.api.LoaderHandler.initialise()

        if(configuration.containsKey(LoaderOptions.STATISTICS_ENABLED)) {
            handler = new StatisticsHandler(handler, configuration);
        }

        handler.initialise();

        if(configuration.containsKey(LoaderOptions.DIRS)) {
            for(String dirname : configuration.getStringArray(LoaderOptions.DIRS)) {
                File dir = new File(dirname);
View Full Code Here

Examples of org.apache.marmotta.platform.core.api.triplestore.SesameService.initialise()

            }

            // trigger startup of the sesame service once the hostname is ready (we need the correct URIs for
            // default, cache and inferred context)
            SesameService sesameService  = CDIContext.getInstance(SesameService.class);
            sesameService.initialise();
            sesameEvent.fire(new SesameStartupEvent());

            // trigger startup of the user service once the sesame service is ready
            UserService   userService    = CDIContext.getInstance(UserService.class);
View Full Code Here

Examples of org.apache.qpid.security.AMQPCallbackHandler.initialise()

        Class mechanismClass = CallbackHandlerRegistry.getInstance().getCallbackHandlerClass(mechanism);
        try
        {
            Object instance = mechanismClass.newInstance();
            AMQPCallbackHandler cbh = (AMQPCallbackHandler) instance;
            cbh.initialise(username,password);
            return cbh;
        }
        catch (Exception e)
        {
            throw new QpidException("Unable to create callback handler: " + e,ErrorCode.UNDEFINED, e.getCause());
View Full Code Here

Examples of org.apache.qpid.security.UsernamePasswordCallbackHandler.initialise()

            {
                saslProps.put(Sasl.QOP, "auth-conf");
            }
            UsernamePasswordCallbackHandler handler =
                new UsernamePasswordCallbackHandler();
            handler.initialise(conSettings.getUsername(), conSettings.getPassword());
            SaslClient sc = Sasl.createSaslClient
                (mechs, null, conSettings.getSaslProtocol(), conSettings.getSaslServerName(), saslProps, handler);
            conn.setSaslClient(sc);

            byte[] response = sc.hasInitialResponse() ?
View Full Code Here

Examples of org.apache.qpid.server.exchange.DestNameExchange.initialise()

    public void testExchangeMBeanInfo() throws Exception
    {
        // If this test fails due to changes in the broker code,
        // then the constants in the Constants.java shoule be updated accordingly
        DestNameExchange exchange = new DestNameExchange();
        exchange.initialise(_virtualHost, ExchangeDefaults.DIRECT_EXCHANGE_NAME, false, 0, true);
        AMQManagedObject mbean = (AMQManagedObject)exchange.getManagedObject();
        MBeanInfo mbeanInfo = mbean.getMBeanInfo();

        // Check for the Exchange Type property in the ObjectName
        assertNotNull(mbean.getObjectName().getKeyProperty(Constants.EXCHANGE_TYPE));
View Full Code Here

Examples of org.apache.qpid.server.exchange.DirectExchange.initialise()

    public void testExchangeMBeanInfo() throws Exception
    {
        // If this test fails due to changes in the broker code,
        // then the constants in the Constants.java shoule be updated accordingly
        DirectExchange exchange = new DirectExchange();
        exchange.initialise(_virtualHost, ExchangeDefaults.DIRECT_EXCHANGE_NAME, false, 0, true);
        AMQManagedObject mbean = (AMQManagedObject)exchange.getManagedObject();
        MBeanInfo mbeanInfo = mbean.getMBeanInfo();

        // Check for the Exchange Type property in the ObjectName
        assertNotNull(mbean.getObjectName().getKeyProperty(Constants.EXCHANGE_TYPE));
View Full Code Here

Examples of org.apache.qpid.server.security.auth.manager.AuthenticationManager.initialise()

    @Override
    protected void changeAttributes(Map<String, Object> attributes)
    {
        Map<String, Object> effectiveAttributes = super.generateEffectiveAttributes(attributes);
        AuthenticationManager manager = validateAttributes(effectiveAttributes);
        manager.initialise();
        super.changeAttributes(attributes);
        _authManager = (T)manager;

        // if provider was previously in ERRORED state then set its state to ACTIVE
        _state.compareAndSet(State.ERRORED, State.ACTIVE);
View Full Code Here
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.