Package co.nubetech.crux.model

Examples of co.nubetech.crux.model.ConnectionProperty


    Datastore datastore = new Datastore();
    datastore.setId(121212);
    datastore.setName("Hbase");
   
    Connection connection = new Connection();
    ConnectionProperty connectionProperty1 = new ConnectionProperty(connection,
                                  CruxConstants.HBASE_ZOOKEEPER_PROPERTY,"value1");
   
    connection.addProperty(connectionProperty1);
    connection.setDatastore(datastore);
    connection.setId(1);
View Full Code Here


    stmt.executeUpdate("insert into connectionProperty values(99999,99999,'propertyTest','valueTest')");

    ConnectionPropertyDAO connectionPropertyDAO = new ConnectionPropertyDAO();
    try {
    connectionPropertyDAO.session = session;
    ConnectionProperty hostProperty = connectionPropertyDAO
        .findById(99999l);

    connectionPropertyDAO.transaction = connectionPropertyDAO.session
        .getTransaction();
    // connectionPropertyDAO.transaction.begin();
    hostProperty.setValue("updateValueTest");
    connectionPropertyDAO.save(hostProperty);
    // connectionPropertyDAO.transaction.commit();

    ResultSet rsOfConnectionProperty = stmt
        .executeQuery("select value from connectionProperty where id=" + 99999);
View Full Code Here

    ConnectionDAO connectionDAO = new ConnectionDAO();
    connectionDAO.session = session;
    Connection connection = connectionDAO.findById(99999l);
    long propertyId =  0;
    try {
    ConnectionProperty property = new ConnectionProperty();
    property.setConnection(connection);
    property.setProperty(CruxConstants.HBASE_ZOOKEEPER_PROPERTY);
    property.setValue("valueTest");

    ConnectionPropertyDAO propertyDAO = new ConnectionPropertyDAO();
    propertyDAO.session = session;
    propertyDAO.transaction = propertyDAO.session.getTransaction();
    // propertyDAO.transaction.begin();
View Full Code Here

    stmt.executeUpdate("insert into connection values(99999,1,1,'connectionTest')");
    stmt.executeUpdate("insert into connectionProperty values(99999,99999,'propertyTest','valueTest')");

    ConnectionPropertyDAO propertyDAO = new ConnectionPropertyDAO();
    propertyDAO.session = session;
    ConnectionProperty property = propertyDAO.findById(99999l);
    try {
    propertyDAO.transaction = propertyDAO.session.getTransaction();
    // propertyDAO.transaction.begin();
    long propertyId = propertyDAO.delete(property);
    // propertyDAO.transaction.commit();
View Full Code Here

    try {
      connectionDAO.delete(connection);
    } catch (CruxException e) {
    }

    ConnectionProperty property = new ConnectionProperty();
    property.setConnection(connection);
    property.setProperty(CruxConstants.HBASE_ZOOKEEPER_PROPERTY);
    property.setValue("valueTest");

    ConnectionPropertyDAO propertyDAO = new ConnectionPropertyDAO();
    propertyDAO.session = session;
    propertyDAO.transaction = propertyDAO.session.getTransaction();
    try {
View Full Code Here

    datastore.setId(121212);
    datastore.setName("Hbase");
   
    //connection 1
    Connection connection1 = new Connection();
    ConnectionProperty connectionProperty1 = new ConnectionProperty(connection1, CruxConstants.HBASE_ZOOKEEPER_PROPERTY,"value1");
    ConnectionProperty connectionProperty2 = new ConnectionProperty(connection1, CruxConstants.HBASE_ZOOKEEPER_PROPERTY,"value2");
   
    connection1.addProperty(connectionProperty1);
    connection1.addProperty(connectionProperty2);
    connection1.setDatastore(datastore);
    connection1.setUser(user);
    connection1.setId(1);
    connection1.setName("ConnectionName1");       
       
    //connection 2
    Connection connection2 = new Connection();
    ConnectionProperty connectionProperty3 = new ConnectionProperty(connection2, CruxConstants.HBASE_ZOOKEEPER_PROPERTY, "value1");
    ConnectionProperty connectionProperty4 = new ConnectionProperty(connection2, CruxConstants.HBASE_ZOOKEEPER_PROPERTY, "value2");
   
    connection2.addProperty(connectionProperty3);
    connection2.addProperty(connectionProperty4);
    connection2.setDatastore(datastore);
    connection2.setUser(user);
    connection2.setId(2);
    connection2.setName("ConnectionName2");
   
    //connection 3
    Connection connection3 = new Connection();
    ConnectionProperty connectionProperty5 = new ConnectionProperty(connection3, CruxConstants.HBASE_ZOOKEEPER_PROPERTY, "value1");
    ConnectionProperty connectionProperty6 = new ConnectionProperty(connection3, CruxConstants.HBASE_ZOOKEEPER_PROPERTY, "value2");
   
    connection3.addProperty(connectionProperty5);
    connection3.addProperty(connectionProperty6);
    connection3.setDatastore(datastore);
    connection3.setUser(user);
View Full Code Here

   
    // We are hiding the connection id.
    //connection.setId(8001);
   
    connection.setName("ConnectionName");
    ConnectionProperty connectionProperty = new ConnectionProperty(connection, CruxConstants.HBASE_ZOOKEEPER_PROPERTY,"SomeValue");
   
    connection.addProperty(connectionProperty);
    //List of above created connections
    List<Connection> connectionList = new ArrayList<Connection>();
    connectionList.add(connection);
View Full Code Here

    connection.setDatastore(datastore);
    connection.setId(800180018);
    connection.setName("ConnectionName");
   
    // This will not be used.
    ConnectionProperty connectionProperty = new ConnectionProperty(connection, CruxConstants.HBASE_ZOOKEEPER_PROPERTY,"SomeValue");
    // We are not setting the ConnectionProperty object into Connection's properties.
    //connection.addProperty(connectionProperty);
   
    //List of above created connection
    List<Connection> connectionList = new ArrayList<Connection>();
View Full Code Here

  @Test
  public void testSave() throws Exception {
    Connection connection = new Connection();
    connection.setName("HbaseConn1");
    ConnectionProperty connectionProperty = new ConnectionProperty();
    connectionProperty.setProperty(CruxConstants.HBASE_ZOOKEEPER_PROPERTY);
    connectionProperty.setValue("h1:2181,h2:8080");
    connection.addProperty(connectionProperty);

    HBaseConnectionPool pool = new HBaseConnectionPool(
        new HBaseConnectionPoolFactory());
View Full Code Here

  // Can't test for multiple machines.
  @Test
  public void testGetConfiguration() {
    Connection connection = new Connection();

    ConnectionProperty property = new ConnectionProperty();
    property.setProperty(CruxConstants.HBASE_ZOOKEEPER_PROPERTY);
    property.setValue("h1:2181");
    connection.addProperty(property);

    HBaseConnectionPoolFactory hbaseConnectionPoolFactory = new HBaseConnectionPoolFactory();
    Utility utility = new Utility();
    Configuration conf = utility.getConfiguration(connection);
View Full Code Here

TOP

Related Classes of co.nubetech.crux.model.ConnectionProperty

Copyright © 2018 www.massapicom. 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.