Examples of one()


Examples of org.apache.cassandra.cql3.UntypedResultSet.one()

    public static BootstrapState getBootstrapState()
    {
        String req = "SELECT bootstrapped FROM system.%s WHERE key='%s'";
        UntypedResultSet result = processInternal(String.format(req, LOCAL_CF, LOCAL_KEY));

        if (result.isEmpty() || !result.one().has("bootstrapped"))
            return BootstrapState.NEEDS_BOOTSTRAP;

        return BootstrapState.valueOf(result.one().getString("bootstrapped"));
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.UntypedResultSet.one()

        UntypedResultSet result = processInternal(String.format(req, LOCAL_CF, LOCAL_KEY));

        if (result.isEmpty() || !result.one().has("bootstrapped"))
            return BootstrapState.NEEDS_BOOTSTRAP;

        return BootstrapState.valueOf(result.one().getString("bootstrapped"));
    }

    public static boolean bootstrapComplete()
    {
        return getBootstrapState() == BootstrapState.COMPLETED;
View Full Code Here

Examples of org.apache.cassandra.cql3.UntypedResultSet.one()

        String req = "SELECT host_id FROM system.%s WHERE key='%s'";
        UntypedResultSet result = processInternal(String.format(req, LOCAL_CF, LOCAL_KEY));

        // Look up the Host UUID (return it if found)
        if (!result.isEmpty() && result.one().has("host_id"))
        {
            return result.one().getUUID("host_id");
        }

        // ID not found, generate a new one, persist, and then return it.
View Full Code Here

Examples of org.apache.cassandra.cql3.UntypedResultSet.one()

        UntypedResultSet result = processInternal(String.format(req, LOCAL_CF, LOCAL_KEY));

        // Look up the Host UUID (return it if found)
        if (!result.isEmpty() && result.one().has("host_id"))
        {
            return result.one().getUUID("host_id");
        }

        // ID not found, generate a new one, persist, and then return it.
        hostId = UUID.randomUUID();
        logger.warn("No host ID found, created {} (Note: This should happen exactly once per node).", hostId);
View Full Code Here

Examples of org.apache.cassandra.cql3.UntypedResultSet.one()

        String req = "SELECT truncated_at FROM system.%s WHERE key = '%s'";
        UntypedResultSet rows = processInternal(String.format(req, LOCAL_CF, LOCAL_KEY));
        if (rows.isEmpty())
            return Collections.emptyMap();

        UntypedResultSet.Row row = rows.one();
        Map<UUID, ByteBuffer> rawMap = row.getMap("truncated_at", UUIDType.instance, BytesType.instance);
        if (rawMap == null)
            return Collections.emptyMap();

        Map<UUID, Pair<ReplayPosition, Long>> positions = new HashMap<UUID, Pair<ReplayPosition, Long>>();
View Full Code Here

Examples of org.apache.cassandra.cql3.UntypedResultSet.one()

    public static InetAddress getPreferredIP(InetAddress ep)
    {
        String req = "SELECT preferred_ip FROM system.%s WHERE peer='%s'";
        UntypedResultSet result = processInternal(String.format(req, PEERS_CF, ep.getHostAddress()));
        if (!result.isEmpty() && result.one().has("preferred_ip"))
            return result.one().getInetAddress("preferred_ip");
        return null;
    }

    /**
 
View Full Code Here

Examples of org.apache.cassandra.cql3.UntypedResultSet.one()

    public static InetAddress getPreferredIP(InetAddress ep)
    {
        String req = "SELECT preferred_ip FROM system.%s WHERE peer='%s'";
        UntypedResultSet result = processInternal(String.format(req, PEERS_CF, ep.getHostAddress()));
        if (!result.isEmpty() && result.one().has("preferred_ip"))
            return result.one().getInetAddress("preferred_ip");
        return null;
    }

    /**
     * Return a map of IP addresses containing a map of dc and rack info
View Full Code Here

Examples of org.sgx.yuigwt.yui.node.Node.one()

    ssheet1 = Y.newStyleSheet();

    // set the YUI skin to use
    body.addClass("yui3-skin-sam");

    mainPanel = body.one("#layout");
    navContent = body.one("#nav>.content");
    mainContent = body.one("#main>.content");
    mainContent.getDOMNode().setId("main-example-panel");
    extraContent = body.one("#extra>.content");
    footer = body.one("#ft");
View Full Code Here

Examples of org.sgx.yuigwt.yuigallery.YuiGalleryContext.one()

  @Override
  public void ready(YuiContext Y_) {   
    //cast to YuiGalleryContext for using the yui gallery java api.
    final YuiGalleryContext Y = Y_.cast();
    //redefine parent loading the new Y sandbox.
    Node p = Y.one(parent.getDOMNode());
    p.append("<p>Write some tags, comma separated: </p>" );
    Node input1 = p.appendChild("<input type=\"text\"></input>");
    input1.plug(Y.GalleryPlugin().TokenInput(), TokenInputPluginConfig.create().removeButton(true));
    final TokenInputPlugin tiPlugin = input1.getPlugin("tokenInput").cast();
    Y.newButton(ButtonConfig.create().label("Accept").render(parent).on("click", new EventCallback<EventFacade>() {
View Full Code Here

Examples of ptolemy.data.Token.one()

                return;
            }

            // For the benefit of copernicus, this means that
            // numerator always has the same type.
            numerator = multiply.getType().convert(denominator.one());
        }

        if (denominator != null) {
            numerator = numerator.divide(denominator);
        }
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.