Examples of Action


Examples of org.apache.blur.manager.clusterstatus.ClusterStatus.Action

    safeMode.registerNode(getNodeName(), BlurUtil.getVersion().getBytes());

    _timerTableWarmer = setupTableWarmer();
    _timerTableWarmer.start();
    _watchOnlineShards = watchForShardServerChanges();
    _clusterStatus.registerActionOnTableStateChange(new Action() {
      @Override
      public void action() {
        synchronized (_warmupLock) {
          _warmupLock.notifyAll();
        }
      }
    });
    _clusterStatus.registerActionOnTableStateChange(new Action() {
      @Override
      public void action() {
        synchronized (_cleanupLock) {
          _cleanupLock.notifyAll();
        }
View Full Code Here

Examples of org.apache.blur.utils.GCWatcher.Action

        } catch (Throwable e) {
          LOG.error("Unknown error while trying to cleanup finished queries.", e);
        }
      }
    }, statusCleanupTimerDelay, statusCleanupTimerDelay);
    GCWatcher.registerAction(new Action() {
      @Override
      public void takeAction() throws Exception {
        stopAllQueriesForBackPressure();
      }
    });
View Full Code Here

Examples of org.apache.cocoon.acting.Action

     * @param parameters Action parameters.
     */
    public final Map act(String type, String source, Parameters parameters) {

        ComponentSelector selector = null;
        Action action = null;
        SourceResolver resolver = null;

        Map result = null;
        try {
            selector = (ComponentSelector) this.manager.lookup(Action.ROLE +
                "Selector");
            assertNotNull("Test lookup of action selector", selector);

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            assertNotNull("Test lookup of source resolver", resolver);

            assertNotNull("Test if action name is not null", type);
            action = (Action) selector.select(type);
            assertNotNull("Test lookup of action", action);

            result = action.act(redirector, new SourceResolverAdapter(resolver, this.manager),
                                objectmodel, source, parameters);

        } catch (ComponentException ce) {
            getLogger().error("Could not retrieve generator", ce);
            fail("Could not retrieve generator: " + ce.toString());
View Full Code Here

Examples of org.apache.cocoon.sitemap.action.Action

    public void installAction(String type) {
        if (this.pipeline == null) {
            throw new IllegalStateException("Action cannot be installed without having a pipeline.");
        }

        Action action = this.componentProvider.createAction(type);
        this.actions.add(action);
    }
View Full Code Here

Examples of org.apache.commons.scxml.model.Action

            return false;
        }
        boolean exit = false;
        Iterator i = l.iterator();
        while (i.hasNext()) {
            Action a = (Action) i.next();
            if (a instanceof Var) {
                Var v = (Var) a;
                b.append(indent).append("<var name=\"").append(v.getName())
                        .append("\" expr=\"").append(v.getExpr()).append(
                                "\"/>\n");
View Full Code Here

Examples of org.apache.commons.scxml2.model.Action

        if (!(actionObject instanceof Action)) {
            throw new IllegalArgumentException(ERR_CUSTOM_ACTION_TYPE + className);
        }

        // Set the attribute values as properties
        Action action = (Action) actionObject;
        for (int i = 0; i < reader.getAttributeCount(); i++) {
            String name = reader.getAttributeLocalName(i);
            String value = reader.getAttributeValue(i);
            String setter = "set" + name.substring(0, 1).toUpperCase() + name.substring(1);
            Method method = null;
            try {
                method = clazz.getMethod(setter, String.class);
                method.invoke(action, value);
            } catch (NoSuchMethodException nsme) {
                throw new XMLStreamException("No setter in class:" + className + ", for string property:" + name,
                        nsme);
            } catch (InvocationTargetException ite) {
                throw new XMLStreamException("Exception calling setter for string property:" + name + " in class:"
                        + className, ite);
            } catch (IllegalAccessException iae) {
                throw new XMLStreamException("Cannot access setter for string property:" + name + " in class:"
                        + className, iae);
            }
        }

        // Add any body content if necessary
        if (action instanceof ExternalContent) {
            Node body = readNode(reader, configuration, customAction.getNamespaceURI(),
                    customAction.getLocalName(), new String [] {});
            NodeList childNodes = body.getChildNodes();
            List<Node> externalNodes = ((ExternalContent) action).getExternalNodes();
            for (int i = 0; i < childNodes.getLength(); i++) {
                externalNodes.add(childNodes.item(i));
            }
        }

        // Wire in the action and add to parent
        readNamespaces(configuration, action);
        action.setParent(executable);
        if (parent != null) {
            parent.addAction(action);
        } else {
            executable.addAction(action);
        }
View Full Code Here

Examples of org.apache.falcon.oozie.coordinator.ACTION

        }

        private ACTION getRetentionWorkflowAction(Cluster cluster, Path wfPath, String wfName)
            throws FalconException {
            Feed feed = getEntity();
            ACTION retentionAction = new ACTION();
            WORKFLOW retentionWorkflow = new WORKFLOW();
            createRetentionWorkflow(cluster, wfPath, wfName);
            retentionWorkflow.setAppPath(getStoragePath(wfPath.toString()));

            Map<String, String> props = createCoordDefaultConfiguration(cluster, wfPath, wfName);
            props.put("timeZone", feed.getTimezone().getID());
            props.put("frequency", feed.getFrequency().getTimeUnit().name());

            final Storage storage = FeedHelper.createStorage(cluster, feed);
            props.put("falconFeedStorageType", storage.getType().name());

            String feedDataPath = storage.getUriTemplate();
            props.put("feedDataPath",
                    feedDataPath.replaceAll(Storage.DOLLAR_EXPR_START_REGEX, Storage.QUESTION_EXPR_START_REGEX));

            org.apache.falcon.entity.v0.feed.Cluster feedCluster =
                    FeedHelper.getCluster(feed, cluster.getName());
            props.put("limit", feedCluster.getRetention().getLimit().toString());

            props.put(ARG.operation.getPropName(), EntityOps.DELETE.name());
            props.put(ARG.feedNames.getPropName(), feed.getName());
            props.put(ARG.feedInstancePaths.getPropName(), "IGNORE");

            retentionWorkflow.setConfiguration(getCoordConfig(props));
            retentionAction.setWorkflow(retentionWorkflow);

            return retentionAction;
        }
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.ACTION

        List<Object> actions = wf.getDecisionOrForkOrJoin();
        for (Object obj : actions) {
            if (!(obj instanceof ACTION)) {
                continue;
            }
            ACTION action = (ACTION) obj;
            List<String> files = null;
            if (action.getJava() != null) {
                files = action.getJava().getFile();
            } else if (action.getPig() != null) {
                files = action.getPig().getFile();
            } else if (action.getMapReduce() != null) {
                files = action.getMapReduce().getFile();
            }
            if (files != null) {
                Assert.assertTrue(files.get(files.size() - 1).endsWith("/projects/falcon/working/libext/FEED/"
                        + lifecycle + "/ext.jar"));
            }
View Full Code Here

Examples of org.apache.felix.gogo.commands.Action

            return blueprintConverter.convert(o, new GenericType(type));
        }
    }

    protected Action createNewAction() throws Exception {
        Action action = (Action) blueprintContainer.getComponentInstance(actionId);
        if (action instanceof BlueprintContainerAware) {
            ((BlueprintContainerAware) action).setBlueprintContainer(blueprintContainer);
        }
        if (action instanceof BundleContextAware) {
            BundleContext context = (BundleContext) blueprintContainer.getComponentInstance("blueprintBundleContext");
View Full Code Here

Examples of org.apache.hadoop.hbase.chaos.actions.Action

        new DaemonThreadFactory("TwoConcurrentAction-"));
  }

  @Override
  protected void runOneIteration() {
    Action actionOne = PolicyBasedChaosMonkey.selectRandomItem(actionsOne);
    Action actionTwo = PolicyBasedChaosMonkey.selectRandomItem(actionsTwo);

    Future fOne = executor.submit(new ActionRunner(actionOne));
    Future fTwo = executor.submit(new ActionRunner(actionTwo));

    try {
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.