You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streams.apache.org by steveblackmon <gi...@git.apache.org> on 2015/03/28 21:25:18 UTC

[GitHub] incubator-streams pull request: resolves STREAMS-273

GitHub user steveblackmon opened a pull request:

    https://github.com/apache/incubator-streams/pull/206

    resolves STREAMS-273

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/steveblackmon/incubator-streams STREAMS-273

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-streams/pull/206.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #206
    
----
commit 52228bb58ab440a082150855604d1c7eb413dc36
Author: Steve Blackmon (@steveblackmon) <sb...@apache.org>
Date:   2015-03-28T20:21:33Z

    resolves STREAMS-273

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: resolves STREAMS-273

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-streams/pull/206


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: resolves STREAMS-273

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/206#discussion_r27532980
  
    --- Diff: streams-components/streams-http/src/main/java/org/apache/streams/components/http/processor/SimpleHTTPPostProcessor.java ---
    @@ -0,0 +1,278 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.streams.components.http.processor;
    +
    +import com.fasterxml.jackson.core.JsonProcessingException;
    +import com.fasterxml.jackson.databind.ObjectMapper;
    +import com.fasterxml.jackson.databind.node.ObjectNode;
    +import com.google.common.base.Strings;
    +import com.google.common.collect.Lists;
    +import com.google.common.collect.Maps;
    +import org.apache.commons.codec.binary.Base64;
    +import org.apache.http.HttpEntity;
    +import org.apache.http.client.methods.CloseableHttpResponse;
    +import org.apache.http.client.methods.HttpGet;
    +import org.apache.http.client.methods.HttpPost;
    +import org.apache.http.client.utils.URIBuilder;
    +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.util.EntityUtils;
    +import org.apache.streams.components.http.HttpConfigurator;
    +import org.apache.streams.components.http.HttpProcessorConfiguration;
    +import org.apache.streams.config.StreamsConfigurator;
    +import org.apache.streams.core.StreamsDatum;
    +import org.apache.streams.core.StreamsProcessor;
    +import org.apache.streams.jackson.StreamsJacksonMapper;
    +import org.apache.streams.pojo.extensions.ExtensionUtil;
    +import org.apache.streams.pojo.json.ActivityObject;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.IOException;
    +import java.net.URI;
    +import java.net.URISyntaxException;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Processor retrieves contents from an known url and stores the resulting object in an extension field
    + */
    +public class SimpleHTTPPostProcessor implements StreamsProcessor {
    +
    +    private final static String STREAMS_ID = "SimpleHTTPPostProcessor";
    +
    +    private final static Logger LOGGER = LoggerFactory.getLogger(SimpleHTTPPostProcessor.class);
    +
    +    protected ObjectMapper mapper;
    +
    +    protected URIBuilder uriBuilder;
    +
    +    protected CloseableHttpClient httpclient;
    +
    +    protected HttpProcessorConfiguration configuration;
    +
    +    protected String authHeader;
    +
    +    public SimpleHTTPPostProcessor() {
    +        this(HttpConfigurator.detectProcessorConfiguration(StreamsConfigurator.config.getConfig("http")));
    +    }
    +
    +    public SimpleHTTPPostProcessor(HttpProcessorConfiguration processorConfiguration) {
    +        LOGGER.info("creating SimpleHTTPPostProcessor");
    +        LOGGER.info(processorConfiguration.toString());
    +        this.configuration = processorConfiguration;
    +    }
    +
    +
    +    /**
    +     Override this to store a result other than exact json representation of response
    +     */
    +    protected ObjectNode prepareExtensionFragment(String entityString) {
    +
    +        try {
    +            return mapper.readValue(entityString, ObjectNode.class);
    +        } catch (IOException e) {
    +            LOGGER.warn(e.getMessage());
    +            return null;
    +        }
    +    }
    +
    +    /**
    +     Override this to place result in non-standard location on document
    +     */
    +    protected ObjectNode getRootDocument(StreamsDatum datum) {
    +
    +        try {
    +            String json = datum.getDocument() instanceof String ?
    +                    (String) datum.getDocument() :
    +                    mapper.writeValueAsString(datum.getDocument());
    +            return mapper.readValue(json, ObjectNode.class);
    +        } catch (JsonProcessingException e) {
    +            LOGGER.warn(e.getMessage());
    +            return null;
    +        } catch (IOException e) {
    +            LOGGER.warn(e.getMessage());
    +            return null;
    +        }
    +
    +    }
    +
    +    /**
    +     Override this to place result in non-standard location on document
    +     */
    +    protected ActivityObject getEntityToExtend(ObjectNode rootDocument) {
    +
    +        if( this.configuration.getEntity().equals(HttpProcessorConfiguration.Entity.ACTIVITY))
    +            return mapper.convertValue(rootDocument, ActivityObject.class);
    +        else
    +            return mapper.convertValue(rootDocument.get(this.configuration.getEntity().toString()), ActivityObject.class);
    +
    +    }
    +
    +    /**
    +     Override this to place result in non-standard location on document
    +     */
    +    protected ObjectNode setEntityToExtend(ObjectNode rootDocument, ActivityObject activityObject) {
    +
    +        if( this.configuration.getEntity().equals(HttpProcessorConfiguration.Entity.ACTIVITY))
    +            return mapper.convertValue(activityObject, ObjectNode.class);
    +        else
    +            rootDocument.set(this.configuration.getEntity().toString(), mapper.convertValue(activityObject, ObjectNode.class));
    +
    +        return rootDocument;
    +
    +    }
    +
    +    @Override
    +    public List<StreamsDatum> process(StreamsDatum entry) {
    +
    +        List<StreamsDatum> result = Lists.newArrayList();
    +
    +        ObjectNode rootDocument = getRootDocument(entry);
    +
    +        Map<String, String> params = prepareParams(entry);
    +
    +        URI uri;
    +        for( Map.Entry<String,String> param : params.entrySet()) {
    +            uriBuilder = uriBuilder.setParameter(param.getKey(), param.getValue());
    +        }
    +        try {
    +            uri = uriBuilder.build();
    +        } catch (URISyntaxException e) {
    +            LOGGER.error("URI error {}", uriBuilder.toString());
    --- End diff --
    
    fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: resolves STREAMS-273

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/206#discussion_r27532936
  
    --- Diff: streams-components/streams-http/src/main/java/org/apache/streams/components/http/processor/SimpleHTTPPostProcessor.java ---
    @@ -0,0 +1,278 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.streams.components.http.processor;
    +
    +import com.fasterxml.jackson.core.JsonProcessingException;
    +import com.fasterxml.jackson.databind.ObjectMapper;
    +import com.fasterxml.jackson.databind.node.ObjectNode;
    +import com.google.common.base.Strings;
    +import com.google.common.collect.Lists;
    +import com.google.common.collect.Maps;
    +import org.apache.commons.codec.binary.Base64;
    +import org.apache.http.HttpEntity;
    +import org.apache.http.client.methods.CloseableHttpResponse;
    +import org.apache.http.client.methods.HttpGet;
    +import org.apache.http.client.methods.HttpPost;
    +import org.apache.http.client.utils.URIBuilder;
    +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.util.EntityUtils;
    +import org.apache.streams.components.http.HttpConfigurator;
    +import org.apache.streams.components.http.HttpProcessorConfiguration;
    +import org.apache.streams.config.StreamsConfigurator;
    +import org.apache.streams.core.StreamsDatum;
    +import org.apache.streams.core.StreamsProcessor;
    +import org.apache.streams.jackson.StreamsJacksonMapper;
    +import org.apache.streams.pojo.extensions.ExtensionUtil;
    +import org.apache.streams.pojo.json.ActivityObject;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.IOException;
    +import java.net.URI;
    +import java.net.URISyntaxException;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Processor retrieves contents from an known url and stores the resulting object in an extension field
    + */
    +public class SimpleHTTPPostProcessor implements StreamsProcessor {
    +
    +    private final static String STREAMS_ID = "SimpleHTTPPostProcessor";
    +
    +    private final static Logger LOGGER = LoggerFactory.getLogger(SimpleHTTPPostProcessor.class);
    +
    +    protected ObjectMapper mapper;
    +
    +    protected URIBuilder uriBuilder;
    +
    +    protected CloseableHttpClient httpclient;
    +
    +    protected HttpProcessorConfiguration configuration;
    +
    +    protected String authHeader;
    +
    +    public SimpleHTTPPostProcessor() {
    +        this(HttpConfigurator.detectProcessorConfiguration(StreamsConfigurator.config.getConfig("http")));
    +    }
    +
    +    public SimpleHTTPPostProcessor(HttpProcessorConfiguration processorConfiguration) {
    +        LOGGER.info("creating SimpleHTTPPostProcessor");
    +        LOGGER.info(processorConfiguration.toString());
    +        this.configuration = processorConfiguration;
    +    }
    +
    +
    +    /**
    +     Override this to store a result other than exact json representation of response
    +     */
    +    protected ObjectNode prepareExtensionFragment(String entityString) {
    +
    +        try {
    +            return mapper.readValue(entityString, ObjectNode.class);
    +        } catch (IOException e) {
    +            LOGGER.warn(e.getMessage());
    --- End diff --
    
    fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: resolves STREAMS-273

Posted by robdouglas <gi...@git.apache.org>.
Github user robdouglas commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/206#discussion_r27484013
  
    --- Diff: streams-components/streams-http/src/main/java/org/apache/streams/components/http/processor/SimpleHTTPPostProcessor.java ---
    @@ -0,0 +1,278 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.streams.components.http.processor;
    +
    +import com.fasterxml.jackson.core.JsonProcessingException;
    +import com.fasterxml.jackson.databind.ObjectMapper;
    +import com.fasterxml.jackson.databind.node.ObjectNode;
    +import com.google.common.base.Strings;
    +import com.google.common.collect.Lists;
    +import com.google.common.collect.Maps;
    +import org.apache.commons.codec.binary.Base64;
    +import org.apache.http.HttpEntity;
    +import org.apache.http.client.methods.CloseableHttpResponse;
    +import org.apache.http.client.methods.HttpGet;
    +import org.apache.http.client.methods.HttpPost;
    +import org.apache.http.client.utils.URIBuilder;
    +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.util.EntityUtils;
    +import org.apache.streams.components.http.HttpConfigurator;
    +import org.apache.streams.components.http.HttpProcessorConfiguration;
    +import org.apache.streams.config.StreamsConfigurator;
    +import org.apache.streams.core.StreamsDatum;
    +import org.apache.streams.core.StreamsProcessor;
    +import org.apache.streams.jackson.StreamsJacksonMapper;
    +import org.apache.streams.pojo.extensions.ExtensionUtil;
    +import org.apache.streams.pojo.json.ActivityObject;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.IOException;
    +import java.net.URI;
    +import java.net.URISyntaxException;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Processor retrieves contents from an known url and stores the resulting object in an extension field
    + */
    +public class SimpleHTTPPostProcessor implements StreamsProcessor {
    +
    +    private final static String STREAMS_ID = "SimpleHTTPPostProcessor";
    +
    +    private final static Logger LOGGER = LoggerFactory.getLogger(SimpleHTTPPostProcessor.class);
    +
    +    protected ObjectMapper mapper;
    +
    +    protected URIBuilder uriBuilder;
    +
    +    protected CloseableHttpClient httpclient;
    +
    +    protected HttpProcessorConfiguration configuration;
    +
    +    protected String authHeader;
    +
    +    public SimpleHTTPPostProcessor() {
    +        this(HttpConfigurator.detectProcessorConfiguration(StreamsConfigurator.config.getConfig("http")));
    +    }
    +
    +    public SimpleHTTPPostProcessor(HttpProcessorConfiguration processorConfiguration) {
    +        LOGGER.info("creating SimpleHTTPPostProcessor");
    +        LOGGER.info(processorConfiguration.toString());
    +        this.configuration = processorConfiguration;
    +    }
    +
    +
    +    /**
    +     Override this to store a result other than exact json representation of response
    +     */
    +    protected ObjectNode prepareExtensionFragment(String entityString) {
    +
    +        try {
    +            return mapper.readValue(entityString, ObjectNode.class);
    +        } catch (IOException e) {
    +            LOGGER.warn(e.getMessage());
    +            return null;
    +        }
    +    }
    +
    +    /**
    +     Override this to place result in non-standard location on document
    +     */
    +    protected ObjectNode getRootDocument(StreamsDatum datum) {
    +
    +        try {
    +            String json = datum.getDocument() instanceof String ?
    +                    (String) datum.getDocument() :
    +                    mapper.writeValueAsString(datum.getDocument());
    +            return mapper.readValue(json, ObjectNode.class);
    +        } catch (JsonProcessingException e) {
    +            LOGGER.warn(e.getMessage());
    +            return null;
    +        } catch (IOException e) {
    +            LOGGER.warn(e.getMessage());
    +            return null;
    +        }
    +
    +    }
    +
    +    /**
    +     Override this to place result in non-standard location on document
    +     */
    +    protected ActivityObject getEntityToExtend(ObjectNode rootDocument) {
    +
    +        if( this.configuration.getEntity().equals(HttpProcessorConfiguration.Entity.ACTIVITY))
    +            return mapper.convertValue(rootDocument, ActivityObject.class);
    +        else
    +            return mapper.convertValue(rootDocument.get(this.configuration.getEntity().toString()), ActivityObject.class);
    +
    +    }
    +
    +    /**
    +     Override this to place result in non-standard location on document
    +     */
    +    protected ObjectNode setEntityToExtend(ObjectNode rootDocument, ActivityObject activityObject) {
    +
    +        if( this.configuration.getEntity().equals(HttpProcessorConfiguration.Entity.ACTIVITY))
    +            return mapper.convertValue(activityObject, ObjectNode.class);
    +        else
    +            rootDocument.set(this.configuration.getEntity().toString(), mapper.convertValue(activityObject, ObjectNode.class));
    +
    +        return rootDocument;
    +
    +    }
    +
    +    @Override
    +    public List<StreamsDatum> process(StreamsDatum entry) {
    +
    +        List<StreamsDatum> result = Lists.newArrayList();
    +
    +        ObjectNode rootDocument = getRootDocument(entry);
    +
    +        Map<String, String> params = prepareParams(entry);
    +
    +        URI uri;
    +        for( Map.Entry<String,String> param : params.entrySet()) {
    +            uriBuilder = uriBuilder.setParameter(param.getKey(), param.getValue());
    +        }
    +        try {
    +            uri = uriBuilder.build();
    +        } catch (URISyntaxException e) {
    +            LOGGER.error("URI error {}", uriBuilder.toString());
    --- End diff --
    
    Do we not want to log the exception that was caught here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request: resolves STREAMS-273

Posted by robdouglas <gi...@git.apache.org>.
Github user robdouglas commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/206#discussion_r27483949
  
    --- Diff: streams-components/streams-http/src/main/java/org/apache/streams/components/http/processor/SimpleHTTPPostProcessor.java ---
    @@ -0,0 +1,278 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.streams.components.http.processor;
    +
    +import com.fasterxml.jackson.core.JsonProcessingException;
    +import com.fasterxml.jackson.databind.ObjectMapper;
    +import com.fasterxml.jackson.databind.node.ObjectNode;
    +import com.google.common.base.Strings;
    +import com.google.common.collect.Lists;
    +import com.google.common.collect.Maps;
    +import org.apache.commons.codec.binary.Base64;
    +import org.apache.http.HttpEntity;
    +import org.apache.http.client.methods.CloseableHttpResponse;
    +import org.apache.http.client.methods.HttpGet;
    +import org.apache.http.client.methods.HttpPost;
    +import org.apache.http.client.utils.URIBuilder;
    +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.util.EntityUtils;
    +import org.apache.streams.components.http.HttpConfigurator;
    +import org.apache.streams.components.http.HttpProcessorConfiguration;
    +import org.apache.streams.config.StreamsConfigurator;
    +import org.apache.streams.core.StreamsDatum;
    +import org.apache.streams.core.StreamsProcessor;
    +import org.apache.streams.jackson.StreamsJacksonMapper;
    +import org.apache.streams.pojo.extensions.ExtensionUtil;
    +import org.apache.streams.pojo.json.ActivityObject;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.IOException;
    +import java.net.URI;
    +import java.net.URISyntaxException;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Processor retrieves contents from an known url and stores the resulting object in an extension field
    + */
    +public class SimpleHTTPPostProcessor implements StreamsProcessor {
    +
    +    private final static String STREAMS_ID = "SimpleHTTPPostProcessor";
    +
    +    private final static Logger LOGGER = LoggerFactory.getLogger(SimpleHTTPPostProcessor.class);
    +
    +    protected ObjectMapper mapper;
    +
    +    protected URIBuilder uriBuilder;
    +
    +    protected CloseableHttpClient httpclient;
    +
    +    protected HttpProcessorConfiguration configuration;
    +
    +    protected String authHeader;
    +
    +    public SimpleHTTPPostProcessor() {
    +        this(HttpConfigurator.detectProcessorConfiguration(StreamsConfigurator.config.getConfig("http")));
    +    }
    +
    +    public SimpleHTTPPostProcessor(HttpProcessorConfiguration processorConfiguration) {
    +        LOGGER.info("creating SimpleHTTPPostProcessor");
    +        LOGGER.info(processorConfiguration.toString());
    +        this.configuration = processorConfiguration;
    +    }
    +
    +
    +    /**
    +     Override this to store a result other than exact json representation of response
    +     */
    +    protected ObjectNode prepareExtensionFragment(String entityString) {
    +
    +        try {
    +            return mapper.readValue(entityString, ObjectNode.class);
    +        } catch (IOException e) {
    +            LOGGER.warn(e.getMessage());
    --- End diff --
    
    Instead of just the message, can we log out the entire exception so we can get the stack trace as well?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---