Package org.apache.cassandra.net.http

Examples of org.apache.cassandra.net.http.ColumnFamilyFormatter


      // get the table name
      String sTableName = DatabaseDescriptor.getTables().get(0);

      StringBuilder sb = new StringBuilder();
      ColumnFamilyFormatter cformatter = new ColumnFamilyFormatter(sb);

        try
        {
        Table table = Table.open(sTableName);
        String queryFor = sColumnFamily;
        if(sColumn != null && !"*".equals(sColumn))
        {
          queryFor += ":" + sColumn;
        }
          ColumnFamily cf = table.get(sKey, queryFor);

          if (cf == null)
          {
              sRetVal = "Key [" + sKey + "], column family [" + sColumnFamily + "] not found.";
          }
          else
          {
            cformatter.printKeyColumnFamily(sb, sKey, cf);
            fQuerySuccess = true;
            sRetVal = sb.toString();
          }
        }
        catch (Exception e)
View Full Code Here


      // get the table name
      String sTableName = DatabaseDescriptor.getTables().get(0);

      StringBuilder sb = new StringBuilder();
      ColumnFamilyFormatter cformatter = new ColumnFamilyFormatter(sb);

        try
        {
        Table table = Table.open(sTableName);
        String queryFor = sColumnFamily;
        if(sColumn != null && !"*".equals(sColumn))
        {
          queryFor += ":" + sColumn;
        }
          ColumnFamily cf = table.get(sKey, queryFor);

          if (cf == null)
          {
              sRetVal = "Key [" + sKey + "], column family [" + sColumnFamily + "] not found.";
          }
          else
          {
            cformatter.printKeyColumnFamily(sb, sKey, cf);
            fQuerySuccess = true;
            sRetVal = sb.toString();
          }
        }
        catch (Exception e)
View Full Code Here

TOP

Related Classes of org.apache.cassandra.net.http.ColumnFamilyFormatter

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.