Package org.apache.hadoop.fs.swift.http

Examples of org.apache.hadoop.fs.swift.http.SwiftRestClient


  @Test
  public void testPositiveBlocksize() throws Exception {
    final Configuration configuration = createCoreConfig();
    int size = 127;
    configuration.set(SWIFT_BLOCKSIZE, Integer.toString(size));
    SwiftRestClient restClient = mkInstance(configuration);
    assertEquals(size, restClient.getBlocksizeKB());
  }
View Full Code Here


  @Test
  public void testLocationAwareTruePropagates() throws Exception {
    final Configuration configuration = createCoreConfig();
    set(configuration, DOT_LOCATION_AWARE, "true");
    SwiftRestClient restClient = mkInstance(configuration);
    assertTrue(restClient.isLocationAware());
  }
View Full Code Here

  @Test
  public void testLocationAwareFalsePropagates() throws Exception {
    final Configuration configuration = createCoreConfig();
    set(configuration, DOT_LOCATION_AWARE, "false");
    SwiftRestClient restClient = mkInstance(configuration);
    assertFalse(restClient.isLocationAware());
  }
View Full Code Here

  @Test(expected = org.apache.hadoop.fs.swift.exceptions.SwiftConfigurationException.class)
  public void testNegativePartsize() throws Exception {
    final Configuration configuration = createCoreConfig();
    configuration.set(SWIFT_PARTITION_SIZE, "-1");
    SwiftRestClient restClient = mkInstance(configuration);
  }
View Full Code Here

  @Test
  public void testPositivePartsize() throws Exception {
    final Configuration configuration = createCoreConfig();
    int size = 127;
    configuration.set(SWIFT_PARTITION_SIZE, Integer.toString(size));
    SwiftRestClient restClient = mkInstance(configuration);
    assertEquals(size, restClient.getPartSizeKB());
  }
View Full Code Here

    final Configuration configuration = createCoreConfig();
    String proxy="web-proxy";
    int port = 8088;
    configuration.set(SWIFT_PROXY_HOST_PROPERTY, proxy);
    configuration.set(SWIFT_PROXY_PORT_PROPERTY, Integer.toString(port));
    SwiftRestClient restClient = mkInstance(configuration);
    assertEquals(proxy, restClient.getProxyHost());
    assertEquals(port, restClient.getProxyPort());
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.swift.http.SwiftRestClient

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.