Giter Site home page Giter Site logo

riakcs-java-client's People

Contributors

lucperkins avatar neuhausler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riakcs-java-client's Issues

Localized timestamp in http header

When used on a system that has a non-english default locale, the timestamp in the http headers is written in localized format. The weekday and month fields contain non-english names or abbreviations, which Riak CS is unable interpret, causing authentication to fail.

This can be fixed by simply changing the line

private static final SimpleDateFormat rfc822DateFormat= new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z");

in CommunicationLayer.java to

private static final SimpleDateFormat rfc822DateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.ENGLISH);

As a side note, it appears that s3-curl has the same issue and there it can be fixed by setting environment variable LC_TIME to en_US.UTF-8.

listObjects method in RiakCSClientImpl throws exception

When I call the listObjects method on the RiakCSClientImpl class, I get the following exception

org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) ~[na:1.8.0_45]
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348) ~[na:1.8.0_45]
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) ~[na:1.8.0_45]
    at com.basho.riakcs.client.impl.XMLUtils.parseToDocument(XMLUtils.java:69) ~[bin/:na]
    at com.basho.riakcs.client.impl.RiakCSClientImpl.listObjects(RiakCSClientImpl.java:496) ~[bin/:na]
    at com.basho.riakcs.client.impl.RiakCSClientImpl.listObjects(RiakCSClientImpl.java:475) ~[bin/:na]

I dug around a bit -- the issue seems to stem from the following parser activity

An InputSource object belongs to the application: the SAX parser shall never modify it in any way (it may modify a copy if necessary). However, standard processing of both byte and character streams is to close them on as part of end-of-parse cleanup, so applications should not attempt to re-use such streams after they have been handed to a parser.

Any thoughts on how to get around the issue? I tried to call reset() on the InputStream below but it threw an exception as well.

//com.basho.riakcs.client.impl.XMLUtils.parseToDocument

public static Document parseToDocument(InputStream is, boolean debugModeEnabled) throws Exception
    {
        DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
        DocumentBuilder builder= factory.newDocumentBuilder();
        Document document= builder.parse(is);
        if (debugModeEnabled) System.out.println("Body:\n" + serializeDocument(document) + "\n");

        return document;
    }

push to maven central?

I don't see an easy way to grab this, it doesn't appear to be in the maven central repo.

I got an error when I try to get object form a bucket

I try to run this code in my local machine but I got an error.

RiakCSClient riakCSClient = new RiakCSClient(
    "MY_ACCESS_KEY",
    "MY_SECRET_KEY",
    "127.0.0.1:8080",
     false);
JSONObject jsonObject = riakCSClient.getObject("test-bucket", "useravatar.png");
System.out.println(jsonObject.toString());

This is an error

Exception in thread "main" com.basho.riakcs.client.api.RiakCSException: java.net.UnknownHostException: test-bucket.127.0.0.1
    at com.basho.riakcs.client.impl.RiakCSClientImpl.getObject(RiakCSClientImpl.java:414)
    at com.basho.riakcs.client.impl.RiakCSClientImpl.getObject(RiakCSClientImpl.java:380)
    at com.basho.riakcs.client.api.RiakCSClient.getObject(RiakCSClient.java:156)
    at playriakcs.Playriakcs.main(Playriakcs.java:15)
Caused by: java.net.UnknownHostException: test-bucket.127.0.0.1
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)

missing license file

i assume this is supposed to be Apache2 since riak-cs is, but this repo is missing the license file. is it possible to clear up this ambiguity?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.