Search in sources :

Example 46 with ObjectListing

use of com.amazonaws.services.s3.model.ObjectListing in project aws-doc-sdk-examples by awsdocs.

the class S3EncryptV2 method main.

public static void main(String[] args) throws NoSuchAlgorithmException {
    AmazonS3 s3Client = AmazonS3ClientBuilder.standard().withRegion(Regions.DEFAULT_REGION).build();
    // of this example
    try {
        s3Client.createBucket(bucketName);
    } catch (AmazonS3Exception e) {
        System.err.println(e.getErrorMessage());
    }
    putEncryptedData1();
    putEncryptedData2();
    putEncryptedData3_Kms();
    try {
        ObjectListing objectListing = s3Client.listObjects(bucketName);
        while (true) {
            for (Iterator<?> iterator = objectListing.getObjectSummaries().iterator(); iterator.hasNext(); ) {
                S3ObjectSummary summary = (S3ObjectSummary) iterator.next();
                s3Client.deleteObject(bucketName, summary.getKey());
            }
            if (objectListing.isTruncated()) {
                objectListing = s3Client.listNextBatchOfObjects(objectListing);
            } else {
                break;
            }
        }
    } catch (AmazonS3Exception e) {
        System.err.println(e.getErrorMessage());
    }
    // delete test bucket
    try {
        s3Client.deleteBucket(bucketName);
    } catch (AmazonS3Exception e) {
        System.err.println(e.getErrorMessage());
    }
    s3Client.shutdown();
    System.out.println("Done");
}
Also used : AmazonS3(com.amazonaws.services.s3.AmazonS3) ObjectListing(com.amazonaws.services.s3.model.ObjectListing) S3ObjectSummary(com.amazonaws.services.s3.model.S3ObjectSummary) AmazonS3Exception(com.amazonaws.services.s3.model.AmazonS3Exception)

Example 47 with ObjectListing

use of com.amazonaws.services.s3.model.ObjectListing in project aws-doc-sdk-examples by awsdocs.

the class MakingRequests method main.

public static void main(String[] args) throws IOException {
    Regions clientRegion = Regions.DEFAULT_REGION;
    String bucketName = "*** Bucket name ***";
    try {
        AmazonS3 s3Client = AmazonS3ClientBuilder.standard().withCredentials(new ProfileCredentialsProvider()).withRegion(clientRegion).build();
        // Get a list of objects in the bucket, two at a time, and
        // print the name and size of each object.
        ListObjectsRequest listRequest = new ListObjectsRequest().withBucketName(bucketName).withMaxKeys(2);
        ObjectListing objects = s3Client.listObjects(listRequest);
        while (true) {
            List<S3ObjectSummary> summaries = objects.getObjectSummaries();
            for (S3ObjectSummary summary : summaries) {
                System.out.printf("Object \"%s\" retrieved with size %d\n", summary.getKey(), summary.getSize());
            }
            if (objects.isTruncated()) {
                objects = s3Client.listNextBatchOfObjects(objects);
            } else {
                break;
            }
        }
    } catch (AmazonServiceException e) {
        // The call was transmitted successfully, but Amazon S3 couldn't process
        // it, so it returned an error response.
        e.printStackTrace();
    } catch (SdkClientException e) {
        // Amazon S3 couldn't be contacted for a response, or the client
        // couldn't parse the response from Amazon S3.
        e.printStackTrace();
    }
}
Also used : AmazonS3(com.amazonaws.services.s3.AmazonS3) ListObjectsRequest(com.amazonaws.services.s3.model.ListObjectsRequest) SdkClientException(com.amazonaws.SdkClientException) AmazonServiceException(com.amazonaws.AmazonServiceException) ProfileCredentialsProvider(com.amazonaws.auth.profile.ProfileCredentialsProvider) ObjectListing(com.amazonaws.services.s3.model.ObjectListing) Regions(com.amazonaws.regions.Regions) S3ObjectSummary(com.amazonaws.services.s3.model.S3ObjectSummary)

Example 48 with ObjectListing

use of com.amazonaws.services.s3.model.ObjectListing in project ats-framework by Axway.

the class S3Operations method listBucket.

/**
 * @param folderPrefix
 * @param searchString what pattern to be matched. If null it means all, i.e. &quot;.*&quot;
 * @param recursive
 *
 * @return
 * @throws S3OperationException in case of an error from server
 */
private List<S3ObjectInfo> listBucket(String folderPrefix, String searchString, boolean recursive) {
    List<S3ObjectInfo> allListElements = new ArrayList<S3ObjectInfo>();
    // Alternative but not documented in S3 API: getClient().listObjectsV2(bucket, "prefix")
    ListObjectsRequest request = new ListObjectsRequest(bucketName, folderPrefix, null, recursive ? null : "/", null);
    try {
        ObjectListing objectListing = s3Client.listObjects(request);
        int i = 0;
        if (searchString == null) {
            // any string
            searchString = ".*";
        }
        Pattern searchStringPattern = Pattern.compile(searchString);
        while (true) {
            for (Iterator<?> iterator = objectListing.getObjectSummaries().iterator(); iterator.hasNext(); ) {
                S3ObjectSummary objectSummary = (S3ObjectSummary) iterator.next();
                if (LOG.isTraceEnabled()) {
                    LOG.trace("listObjects(" + (++i) + "): " + objectSummary.toString());
                }
                String[] fileTokens = objectSummary.getKey().split("/");
                String s3Object = fileTokens[fileTokens.length - 1];
                Matcher matcher = searchStringPattern.matcher(s3Object);
                if (matcher.find()) {
                    allListElements.add(new S3ObjectInfo(objectSummary));
                }
            }
            // more objectListing retrieve?
            if (objectListing.isTruncated()) {
                objectListing = s3Client.listNextBatchOfObjects(objectListing);
            } else {
                break;
            }
        }
    } catch (AmazonClientException e) {
        throw new S3OperationException(e);
    }
    return allListElements;
}
Also used : Pattern(java.util.regex.Pattern) Matcher(java.util.regex.Matcher) AmazonClientException(com.amazonaws.AmazonClientException) ArrayList(java.util.ArrayList) ObjectListing(com.amazonaws.services.s3.model.ObjectListing) S3ObjectSummary(com.amazonaws.services.s3.model.S3ObjectSummary) ListObjectsRequest(com.amazonaws.services.s3.model.ListObjectsRequest)

Example 49 with ObjectListing

use of com.amazonaws.services.s3.model.ObjectListing in project XRTB by benmfaul.

the class Configuration method processDirectory.

public void processDirectory(AmazonS3Client s3, ObjectListing listing, String bucket) throws Exception {
    for (S3ObjectSummary objectSummary : listing.getObjectSummaries()) {
        long size = objectSummary.getSize();
        logger.info("*** Processing S3 {}, size: {}", objectSummary.getKey(), size);
        S3Object object = s3.getObject(new GetObjectRequest(bucket, objectSummary.getKey()));
        String bucketName = object.getBucketName();
        String keyName = object.getKey();
        GetObjectTaggingRequest request = new GetObjectTaggingRequest(bucketName, keyName);
        GetObjectTaggingResult result = s3.getObjectTagging(request);
        List<Tag> tags = result.getTagSet();
        String type = null;
        String name = null;
        if (tags.isEmpty()) {
            System.err.println("Error: " + keyName + " has no tags");
        } else {
            for (Tag tag : tags) {
                String key = tag.getKey();
                String value = tag.getValue();
                if (key.equals("type")) {
                    type = value;
                }
                if (key.equals("name")) {
                    name = value;
                }
            }
            if (name == null)
                throw new Exception("Error: " + keyName + " is missing a name tag");
            if (name.contains(" "))
                throw new Exception("Error: " + keyName + " has a name attribute with a space in it");
            if (type == null)
                throw new Exception("Error: " + keyName + " has no type tag");
            if (!name.startsWith("$"))
                name = "$" + name;
            readData(type, name, object, size);
        }
    }
}
Also used : GetObjectTaggingRequest(com.amazonaws.services.s3.model.GetObjectTaggingRequest) S3ObjectSummary(com.amazonaws.services.s3.model.S3ObjectSummary) S3Object(com.amazonaws.services.s3.model.S3Object) GeoTag(com.xrtb.geo.GeoTag) Tag(com.amazonaws.services.s3.model.Tag) GetObjectRequest(com.amazonaws.services.s3.model.GetObjectRequest) GetObjectTaggingResult(com.amazonaws.services.s3.model.GetObjectTaggingResult)

Example 50 with ObjectListing

use of com.amazonaws.services.s3.model.ObjectListing in project XRTB by benmfaul.

the class Configuration method initialize.

/**
 * Initialize the system from the JSON or Aerospike configuration file.
 *
 * @param path String - The file name containing the Java Bean Shell code.
 * @param shard Stromg. The shard name
 * @param port int. The port the web access listens on
 * @param sslPort  int. The port the SSL listens on.
 * @throws Exception
 *             on file errors.
 */
public void initialize(String path, String shard, int port, int sslPort) throws Exception {
    this.fileName = path;
    /**
     ****************************
     * System Name
     ****************************
     */
    this.shard = shard;
    this.port = port;
    this.sslPort = sslPort;
    java.net.InetAddress localMachine = null;
    String useName = null;
    try {
        localMachine = java.net.InetAddress.getLocalHost();
        ipAddress = localMachine.getHostAddress();
        useName = localMachine.getHostName();
    } catch (Exception error) {
        useName = getIpAddress();
    }
    if (shard == null || shard.length() == 0)
        instanceName = useName + ":" + port;
    else
        instanceName = shard + ":" + useName + ":" + port;
    /**
     * Set up tem p files
     */
    // create the temp
    Files.createDirectories(Paths.get("www/temp"));
    // directory in www so
    // preview campaign will
    // work
    /**
     *******************************************
     * USE ZOOKEEPER, AEROSPIKE OR FILE CONFIG
     ********************************************
     */
    String str = null;
    if (path.startsWith("zookeeper")) {
        String[] parts = path.split(":");
        logger.info("Zookeeper: {}", "" + parts);
        zk = new ZkConnect(parts[1]);
        zk.join(parts[2], "bidders", instanceName);
        str = zk.readConfig(parts[2] + "/bidders");
    } else if (path.startsWith("aerospike")) {
        String[] parts = path.split(":");
        logger.info("Zookeeper: {}", "" + parts);
        ;
        String aerospike = parts[1];
        String configKey = parts[2];
        AerospikeHandler spike = AerospikeHandler.getInstance(aerospike, 3000, 300);
        redisson = new RedissonClient(spike);
        Database.getInstance(redisson);
        str = redisson.get(configKey);
        if (str == null) {
            throw new Exception("Aerospike configuration at " + path + " not available.");
        }
        logger.info("Zookeeper: {}", str);
    } else {
        byte[] encoded = Files.readAllBytes(Paths.get(path));
        str = Charset.defaultCharset().decode(ByteBuffer.wrap(encoded)).toString();
        str = Configuration.substitute(str);
        System.out.println(str);
    }
    Map<?, ?> m = DbTools.mapper.readValue(str, Map.class);
    /**
     ****************************************************************************
     */
    seats = new HashMap<String, String>();
    if (m.get("lists") != null) {
        filesList = (List) m.get("lists");
        initializeLookingGlass(filesList);
    }
    if (m.get("s3") != null) {
        Map<String, String> ms3 = (Map) m.get("s3");
        String accessKey = ms3.get("access_key_id");
        String secretAccessKey = ms3.get("secret_access_key");
        String region = ms3.get("region");
        s3_bucket = ms3.get("bucket");
        s3 = new AmazonS3Client(new BasicAWSCredentials(accessKey, secretAccessKey));
        ObjectListing listing = s3.listObjects(new ListObjectsRequest().withBucketName(s3_bucket));
        try {
            processDirectory(s3, listing, s3_bucket);
        } catch (Exception error) {
            System.err.println("ERROR IN AWS LISTING: " + error.toString());
        }
    }
    if (m.get("ssl") != null) {
        Map x = (Map) m.get("ssl");
        ssl = new SSL();
        ssl.setKeyManagerPassword = (String) x.get("setKeyManagerPassword");
        ssl.setKeyStorePassword = (String) x.get("setKeyStorePassword");
        ssl.setKeyStorePath = (String) x.get("setKeyStorePath");
    }
    /**
     * Create the seats id map, and create the bin and win handler classes
     * for each exchange
     */
    seatsList = (List<Map>) m.get("seats");
    for (int i = 0; i < seatsList.size(); i++) {
        Map x = seatsList.get(i);
        String seatId = (String) x.get("id");
        String className = (String) x.get("bid");
        int k = className.indexOf("=");
        String[] parts = new String[2];
        String uri = className.substring(0, k);
        className = className.substring(k + 1);
        String[] options = null;
        /**
         * set up any options on the class string
         */
        if (className.contains("&")) {
            parts = className.split("&");
            className = parts[0].trim();
            options = parts[1].split(",");
            for (int ind = 0; ind < options.length; ind++) {
                options[ind] = options[ind].trim();
            }
        }
        String[] tags = uri.split("/");
        String exchange = tags[tags.length - 1];
        String name = (String) x.get("name");
        if (name == null)
            name = exchange;
        String id = (String) x.get("id");
        seats.put(name, id);
        try {
            Class<?> c = Class.forName(className);
            BidRequest br = (BidRequest) c.newInstance();
            if (br == null) {
                throw new Exception("Could not make new instance of: " + className);
            }
            Map extension = (Map) x.get("extension");
            if (x != null)
                br.handleConfigExtensions(extension);
            /**
             * Handle generic-ized exchanges
             */
            if (className.contains("Generic")) {
                br.setExchange(exchange);
                br.usesEncodedAdm = true;
            }
            RTBServer.exchanges.put(uri, br);
            if (parts[0] != null) {
                for (int ind = 1; ind < parts.length; ind++) {
                    String option = parts[ind];
                    String[] tuples = option.split("=");
                    switch(tuples[0]) {
                        case "usesEncodedAdm":
                            br.usesEncodedAdm = true;
                            break;
                        case "!usesEncodedAdm":
                            br.usesEncodedAdm = false;
                            break;
                        case "rlog":
                            Double rlog = Double.parseDouble(tuples[1]);
                            ExchangeLogLevel.getInstance().setExchangeLogLevel(name, rlog.intValue());
                            break;
                        case "useStrings":
                            break;
                        case "!useStrings":
                            break;
                        case "!usesPiggyBackWins":
                            break;
                        case "usesPiggyBackWins":
                            BidRequest.setUsesPiggyBackWins(name);
                            break;
                        default:
                            System.err.println("Unknown request: " + tuples[0] + " in definition of " + className);
                    }
                }
            }
            /**
             * Appnexus requires additional support for ready, pixel and
             * click
             */
            if (className.contains("Appnexus")) {
                RTBServer.exchanges.put(uri + "/ready", new Appnexus(Appnexus.READY));
                RTBServer.exchanges.put(uri + "/pixel", new Appnexus(Appnexus.PIXEL));
                RTBServer.exchanges.put(uri + "/click", new Appnexus(Appnexus.CLICK));
                RTBServer.exchanges.put(uri + "/delivered", new Appnexus(Appnexus.DELIVERED));
                Appnexus.seatId = seatId;
            }
        } catch (Exception error) {
            System.err.println("Error configuring exchange: " + name + ", error = ");
            throw error;
        }
    }
    /**
     * Create forensiq
     */
    Map fraud = (Map) m.get("fraud");
    if (fraud != null) {
        if (m.get("forensiq") != null) {
            logger.info("*** Fraud detection is set to Forensiq");
            Map f = (Map) m.get("forensiq");
            String ck = (String) f.get("ck");
            Integer x = (Integer) f.get("threshhold");
            if (!(x == 0 || ck == null || ck.equals("none"))) {
                ForensiqClient fx = ForensiqClient.build(ck);
                if (fraud.get("endpoint") != null) {
                    fx.endpoint = (String) fraud.get("endpoint");
                }
                if (fraud.get("bidOnError") != null) {
                    fx.bidOnError = (Boolean) fraud.get("bidOnError");
                }
                if (f.get("connections") != null)
                    ForensiqClient.getInstance().connections = (int) (Integer) fraud.get("connections");
                forensiq = fx;
            }
        } else {
            logger.info("*** Fraud detection is set to MMDB");
            String db = (String) fraud.get("db");
            if (db == null) {
                throw new Exception("No fraud db specified for MMDB");
            }
            MMDBClient fy;
            try {
                fy = MMDBClient.build(db);
            } catch (Error error) {
                throw error;
            }
            if (fraud.get("bidOnError") != null) {
                fy.bidOnError = (Boolean) fraud.get("bidOnError");
            }
            if (fraud.get("watchlist") != null) {
                fy.setWatchlist((List<String>) fraud.get("watchlist"));
            }
            forensiq = fy;
        }
    } else {
        logger.info("*** NO Fraud detection");
    }
    /**
     * Deal with the app object
     */
    m = (Map) m.get("app");
    password = (String) m.get("password");
    if (m.get("threads") != null) {
        RTBServer.threads = (Integer) m.get("threads");
    }
    if (m.get("multibid") != null) {
        multibid = (Boolean) m.get("multibid");
    }
    if (m.get("adminPort") != null) {
        adminPort = (Integer) m.get("adminPort");
    }
    if (m.get("adminSSL") != null) {
        adminSSL = (Boolean) m.get("adminSSL");
    }
    String strategy = (String) m.get("strategy");
    if (strategy != null && strategy.equals("heuristic"))
        RTBServer.strategy = STRATEGY_HEURISTIC;
    else
        RTBServer.strategy = STRATEGY_MAX_CONNECTIONS;
    verbosity = (Map) m.get("verbosity");
    if (verbosity != null) {
        logLevel = (Integer) verbosity.get("level");
        printNoBidReason = (Boolean) verbosity.get("nobid-reason");
    }
    template = (Map) m.get("template");
    if (template == null) {
        throw new Exception("No template defined");
    }
    encodeTemplates();
    encodeTemplateStubs();
    geotags = (Map) m.get("geotags");
    if (geotags != null) {
        String states = (String) geotags.get("states");
        String codes = (String) geotags.get("zipcodes");
        geoTagger.initTags(states, codes);
    }
    Boolean bValue = false;
    bValue = (Boolean) m.get("stopped");
    if (bValue != null && bValue == true) {
        RTBServer.stopped = true;
        pauseOnStart = true;
    }
    Map redis = (Map) m.get("redis");
    if (redis != null) {
        Integer rsize = (Integer) redis.get("pool");
        if (rsize == null)
            rsize = 64;
        String host = (String) redis.get("host");
        Integer rport = (Integer) redis.get("port");
        if (rport == null)
            rport = 6379;
        // JedisPoolConfig poolConfig = new JedisPoolConfig();;
        // configJedis.setMaxTotal(rsize);
        // configJedis.setMaxWaitMillis(10);
        // poolConfig.setMaxIdle(4000);
        // Tests whether connections are dead during idle periods
        // poolConfig.setTestWhileIdle(true);
        // poolConfig.setMaxTotal(4000);
        // poolConfig.setMaxWaitMillis(30);
        // jedisPool = new JedisPool(poolConfig,host,rport);
        MyJedisPool.host = host;
        MyJedisPool.port = rport;
        jedisPool = new MyJedisPool(1000, 1000, 5);
        logger.info("*** JEDISPOOL = {}/{}/{} {}", jedisPool, host, rport, rsize);
    }
    Map zeromq = (Map) m.get("zeromq");
    if (zeromq == null) {
        throw new Exception("Zeromq is mot configured!");
    }
    String value = null;
    Double dValue = 0.0;
    bValue = false;
    Map r = (Map) m.get("aerospike");
    if (r != null) {
        if ((value = (String) r.get("host")) != null)
            cacheHost = value;
        if (r.get("port") != null)
            cachePort = (Integer) r.get("port");
        if (r.get("maxconns") != null)
            maxconns = (Integer) r.get("maxconns");
        AerospikeHandler.getInstance(cacheHost, cachePort, maxconns);
        redisson = new RedissonClient(AerospikeHandler.getInstance());
        Database.getInstance(redisson);
        logger.info("*** Aerospike connection set to: {}. port: {}. connections: {}, handlers: {}", cacheHost, cachePort, maxconns, AerospikeHandler.getInstance().getCount());
        String key = (String) m.get("deadmanswitch");
        if (key != null) {
            deadmanSwitch = new DeadmanSwitch(redisson, key);
        }
    } else {
        redisson = new RedissonClient();
        Database db = Database.getInstance(redisson);
        readDatabaseIntoCache("database.json");
        readBlackListIntoCache("blacklist.json");
    }
    /**
     * Zeromq
     */
    if ((value = (String) zeromq.get("bidchannel")) != null)
        BIDS_CHANNEL = value;
    if ((value = (String) zeromq.get("nobidchannel")) != null)
        NOBIDS_CHANNEL = value;
    if ((value = (String) zeromq.get("winchannel")) != null)
        WINS_CHANNEL = value;
    if ((value = (String) zeromq.get("requests")) != null)
        REQUEST_CHANNEL = value;
    if ((value = (String) zeromq.get("unilogger")) != null)
        UNILOGGER_CHANNEL = value;
    if ((value = (String) zeromq.get("clicks")) != null)
        CLICKS_CHANNEL = value;
    if ((value = (String) zeromq.get("fraud")) != null)
        FORENSIQ_CHANNEL = value;
    if ((value = (String) zeromq.get("responses")) != null)
        RESPONSES = value;
    if ((value = (String) zeromq.get("status")) != null)
        PERF_CHANNEL = value;
    if ((value = (String) zeromq.get("reasons")) != null)
        REASONS_CHANNEL = value;
    Map xx = (Map) zeromq.get("subscribers");
    List<String> list = (List) xx.get("hosts");
    commandsPort = (String) xx.get("commands");
    for (String host : list) {
        String address = "tcp://" + host + ":" + commandsPort + "&commands";
        commandAddresses.add(address);
    }
    if (zeromq.get("requeststrategy") != null) {
        Object obj = zeromq.get("requeststrategy");
        if (obj instanceof String) {
            strategy = (String) zeromq.get("requeststrategy");
            if (strategy.equalsIgnoreCase("all") || strategy.equalsIgnoreCase("requests"))
                requstLogStrategy = REQUEST_STRATEGY_ALL;
            if (strategy.equalsIgnoreCase("bids"))
                requstLogStrategy = REQUEST_STRATEGY_BIDS;
            if (strategy.equalsIgnoreCase("WINS"))
                requstLogStrategy = REQUEST_STRATEGY_WINS;
        } else {
            if (obj instanceof Integer) {
                int level = (Integer) obj;
                ExchangeLogLevel.getInstance().setStdLevel(level);
            } else if (obj instanceof Double) {
                Double perc = (Double) obj;
                ExchangeLogLevel.getInstance().setStdLevel(perc.intValue());
            }
        }
    }
    /**
     *****************************************************************
     */
    campaignsList.clear();
    pixelTrackingUrl = (String) m.get("pixel-tracking-url");
    winUrl = (String) m.get("winurl");
    redirectUrl = (String) m.get("redirect-url");
    if (m.get("ttl") != null) {
        ttl = (Integer) m.get("ttl");
    }
    initialLoadlist = (List<Map>) m.get("campaigns");
    for (Map<String, String> camp : initialLoadlist) {
        if (camp.get("id") != null) {
            addCampaign(camp.get("name"), camp.get("id"));
        } else {
            logger.error("Configuration, *** ERRORS DETECTED IN INITIAL LOAD OF CAMPAIGNS *** ");
        }
    }
    if (cacheHost == null)
        logger.warn("*** NO AEROSPIKE CONFIGURED, USING CACH2K INSTEAD *** ");
    if (winUrl.contains("localhost")) {
        logger.warn("Configuration", "*** WIN URL IS SET TO LOCALHOST, NO REMOTE ACCESS WILL WORK FOR WINS ***");
    }
}
Also used : MMDBClient(com.xrtb.fraud.MMDBClient) ObjectListing(com.amazonaws.services.s3.model.ObjectListing) BidRequest(com.xrtb.pojo.BidRequest) ListObjectsRequest(com.amazonaws.services.s3.model.ListObjectsRequest) DeadmanSwitch(com.xrtb.bidder.DeadmanSwitch) Database(com.xrtb.db.Database) List(java.util.List) ArrayList(java.util.ArrayList) Appnexus(com.xrtb.exchanges.appnexus.Appnexus) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) AmazonS3Client(com.amazonaws.services.s3.AmazonS3Client) RedissonClient(com.aerospike.redisson.RedissonClient) AerospikeHandler(com.aerospike.redisson.AerospikeHandler) S3Object(com.amazonaws.services.s3.model.S3Object) DataBaseObject(com.xrtb.db.DataBaseObject) Map(java.util.Map) NavMap(com.xrtb.blocks.NavMap) HashMap(java.util.HashMap) ForensiqClient(com.xrtb.fraud.ForensiqClient)

Aggregations

ObjectListing (com.amazonaws.services.s3.model.ObjectListing)104 S3ObjectSummary (com.amazonaws.services.s3.model.S3ObjectSummary)81 ListObjectsRequest (com.amazonaws.services.s3.model.ListObjectsRequest)55 ArrayList (java.util.ArrayList)44 AmazonS3 (com.amazonaws.services.s3.AmazonS3)22 AmazonClientException (com.amazonaws.AmazonClientException)17 DeleteObjectsRequest (com.amazonaws.services.s3.model.DeleteObjectsRequest)16 IOException (java.io.IOException)14 AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)12 Date (java.util.Date)12 Test (org.junit.Test)11 Test (org.testng.annotations.Test)11 AmazonServiceException (com.amazonaws.AmazonServiceException)10 HashMap (java.util.HashMap)10 Path (org.apache.hadoop.fs.Path)9 AmazonS3Exception (com.amazonaws.services.s3.model.AmazonS3Exception)8 DeleteObjectsResult (com.amazonaws.services.s3.model.DeleteObjectsResult)7 S3Object (com.amazonaws.services.s3.model.S3Object)7 Properties (java.util.Properties)6 FileStatus (org.apache.hadoop.fs.FileStatus)6