// Path: java/src/main/java/monasca/persister/repository/RepoException.java
// public class RepoException extends Exception {
// 
//   public RepoException() {
// 
//     super();
//   }
// 
//   public RepoException(String message) {
// 
//     super(message);
//   }
// 
//   public RepoException(String message, Throwable cause) {
// 
//     super(message, cause);
//   }
// 
//   public RepoException(Throwable cause) {
// 
//     super(cause);
//   }
// 
//   protected RepoException(String message, Throwable cause, boolean enableSuppression,
//                           boolean writableStackTrace) {
// 
//     super(message, cause, enableSuppression, writableStackTrace);
//   }
// }


import monasca.persister.configuration.PersisterConfig;
import monasca.persister.repository.RepoException;
import com.google.inject.Inject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.codec.binary.Base64;
import org.apache.http.Header;
import org.apache.http.HeaderElement;
import org.apache.http.HttpEntity;
import org.apache.http.HttpException;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.HttpStatus;
import org.apache.http.client.entity.EntityBuilder;
import org.apache.http.client.entity.GzipDecompressingEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.HashMap;
                   influxPointArry.length, this.influxName, this.influxUrl);

      HttpResponse response = null;

      try {

        response = this.httpClient.execute(request);

      } catch (IOException e) {

        throw new RepoException("failed to execute http request", e);
      }

      int rc = response.getStatusLine().getStatusCode();

      if (rc != HttpStatus.SC_OK && rc != HttpStatus.SC_NO_CONTENT) {

        logger.error("[{}]: failed to send data to influxdb {} at {}: {}", id,
                     this.influxName, this.influxUrl, String.valueOf(rc));

        HttpEntity responseEntity = response.getEntity();

        String responseString = null;

        try {

          responseString = EntityUtils.toString(responseEntity, "UTF-8");

        } catch (IOException e) {

// Path: java/src/main/java/monasca/persister/repository/RepoException.java
// public class RepoException extends Exception {
// 
//   public RepoException() {
// 
//     super();
//   }
// 
//   public RepoException(String message) {
// 
//     super(message);
//   }
// 
//   public RepoException(String message, Throwable cause) {
// 
//     super(message, cause);
//   }
// 
//   public RepoException(Throwable cause) {
// 
//     super(cause);
//   }
// 
//   protected RepoException(String message, Throwable cause, boolean enableSuppression,
//                           boolean writableStackTrace) {
// 
//     super(message, cause, enableSuppression, writableStackTrace);
//   }
// }


// Path: java/src/main/java/monasca/persister/repository/influxdb/InfluxV9RepoWriter.java
import monasca.persister.configuration.PersisterConfig;
import monasca.persister.repository.RepoException;
import com.google.inject.Inject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.codec.binary.Base64;
import org.apache.http.Header;
import org.apache.http.HeaderElement;
import org.apache.http.HttpEntity;
import org.apache.http.HttpException;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.HttpStatus;
import org.apache.http.client.entity.EntityBuilder;
import org.apache.http.client.entity.GzipDecompressingEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.HashMap;

                   influxPointArry.length, this.influxName, this.influxUrl);

      HttpResponse response = null;

      try {

        response = this.httpClient.execute(request);

      } catch (IOException e) {

        throw new RepoException("failed to execute http request", e);
      }

      int rc = response.getStatusLine().getStatusCode();

      if (rc != HttpStatus.SC_OK && rc != HttpStatus.SC_NO_CONTENT) {

        logger.error("[{}]: failed to send data to influxdb {} at {}: {}", id,
                     this.influxName, this.influxUrl, String.valueOf(rc));

        HttpEntity responseEntity = response.getEntity();

        String responseString = null;

        try {

          responseString = EntityUtils.toString(responseEntity, "UTF-8");

        } catch (IOException e) {

         throw new RepoException("failed to read http response for non ok return code " + rc, e);