Package com.netflix.astyanax.recipes.storage

Examples of com.netflix.astyanax.recipes.storage.CassandraChunkedStorageProvider


                .setSeeds(config.getHost())).withConnectionPoolMonitor(new CountingConnectionPoolMonitor())
        .buildKeyspace(ThriftFamilyFactory.getInstance());
    this.astyanaxContext.start();
    this.keyspace = this.astyanaxContext.getEntity();
    this.config = config;
    indexStorage = new CassandraChunkedStorageProvider(keyspace, INDEX_TABLE_NAME);

    descriptorStorage = new ColumnFamily<String, String>(DESCRIPTOR_TABLE_NAME,
        StringSerializer.get(), StringSerializer.get());
  }
View Full Code Here


  }

  @Test
  @Ignore
  public void chunktestbinary() throws IOException {
    ChunkedStorageProvider provider = new CassandraChunkedStorageProvider(
        keyspace, CF);
    InputStream fis = null;
    InputStream bis = null;
    try {
      fis = this.getClass().getClassLoader().getResource(FILEBIN)
View Full Code Here

    }
  }

  @Test
  public void chunktestascii() throws IOException {
    ChunkedStorageProvider provider = new CassandraChunkedStorageProvider(
        keyspace, CF);
    InputStream fis = null;
    InputStream bis = null;
    try {
      fis = this.getClass().getClassLoader().getResource(FILEASC)
View Full Code Here

    }
  }

  public byte[] readChunked(String db, String table, String objName)
      throws Exception {
    ChunkedStorageProvider provider = new CassandraChunkedStorageProvider(
        keyspace, table);
    ObjectMetadata meta = ChunkedStorage.newInfoReader(provider, objName)
        .call();
    ByteArrayOutputStream os = new ByteArrayOutputStream(meta
        .getObjectSize().intValue());
View Full Code Here

    return "{\"message\":\"ok\"}";
  }

  public String writeChunked(String db, String table, String objectName,
      InputStream is) {
    ChunkedStorageProvider provider = new CassandraChunkedStorageProvider(
        keyspace, table);
    ObjectMetadata meta;
    try {
//      if (is!=null) is.reset();
      meta = ChunkedStorage.newWriter(provider, objectName, is)
View Full Code Here

    }
    return "{\"msg\":\"ok\"}";
  }

  public ByteArrayOutputStream readChunked(String db, String table, String objName) {
    ChunkedStorageProvider provider = new CassandraChunkedStorageProvider(
        keyspace, table);
    ObjectMetadata meta;
    ByteArrayOutputStream os = null;
    try {
      meta = ChunkedStorage.newInfoReader(provider, objName).call();
View Full Code Here

  }

  @Test
  public void testChunkedRecipe() throws Exception {

    CassandraChunkedStorageProvider provider = new CassandraChunkedStorageProvider(keyspace, CF_CHUNK);

    StringBuilder sb = new StringBuilder();
    for (int i=0; i<100; i++) {
      sb.append("abcdefghijklmnopqrstuvwxyz_");
    }
View Full Code Here

  }
 
  @Test
  public void testChunkFailure() throws Exception {

    CassandraChunkedStorageProvider provider = new CassandraChunkedStorageProvider(keyspace, CF_CHUNK);

    StringBuilder sb = new StringBuilder();
    for (int i=0; i<100; i++) {
      sb.append("abcdefghijklmnopqrstuvwxyz_");
    }
View Full Code Here

  }
 
  @Test
  public void testAll() throws Exception {
   
    CassandraChunkedStorageProvider provider = new CassandraChunkedStorageProvider(keyspace, CF_CHUNK);
   
    StringBuilder sb = new StringBuilder();
    for (int i=0; i<100; i++) {
      sb.append("abcdefghijklmnopqrstuvwxyz_");
    }
View Full Code Here

TOP

Related Classes of com.netflix.astyanax.recipes.storage.CassandraChunkedStorageProvider

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.