Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CARBONDATA-3337] Implemented Hadoop RPC framework for index server #3171

Conversation

kunal642
Copy link
Contributor

@kunal642 kunal642 commented Apr 3, 2019

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

  • Any interfaces changed?

  • Any backward compatibility impacted?

  • Document update required?

  • Testing done
    Please provide details on
    - Whether new unit test cases have been added or why no new tests are required?
    - How it is tested? Please attach test report.
    - Is it a performance related change? Please attach the performance test report.
    - Any additional information to help reviewers in testing this change.

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2838/

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11098/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3069/

@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2839/

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2840/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3071/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11100/

.setBindAddress(serverIp)
.setPort(serverPort)
.setProtocol(classOf[ServerInterface]).build
server.start()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does start function have return code to judge the status of startting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, return type is void

@@ -2104,4 +2104,17 @@ private CarbonCommonConstants() {
*/
public static final String CARBON_QUERY_DATAMAP_BLOOM_CACHE_SIZE_DEFAULT_VAL = "512";

}
public static final String CARBON_INDEX_SERVER_POLICY = "carbon.index.server.policy";
Copy link
Contributor

@jackylk jackylk Apr 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please write description for this config in comment, like in what scenario this config is used, why user would config it, what valid values are, whether it is dynamic configurable, etc


public static final String CARBON_DRIVER_PRUNE_POLICY = "driver";

public static final String CARBON_INDEX_SERVER_IP = "carbon.index.server.ip";
Copy link
Contributor

@jackylk jackylk Apr 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please write comment for all new configuration. Same comment we should put to document

@@ -1601,4 +1601,47 @@ private void validateDetailQueryBatchSize() {
}
}
}
}

public String getIndexServerPolicy() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comment for all public function


public static final String CARBON_DISTRIBUTED_PRUNE_POLICY = "distributed";

public static final String CARBON_EMBEDDED_PRUNE_POLICY = "embedded";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a "CARBON_INDEX_SERVER_POLICY_DEFAULT" constant

LOGGER.info("The configured value for " + CarbonCommonConstants.CARBON_INDEX_SERVER_POLICY
+ " is not valid, therefore taking " + CarbonCommonConstants.CARBON_EMBEDDED_PRUNE_POLICY
+ " as the index server prune policy");
return CarbonCommonConstants.CARBON_EMBEDDED_PRUNE_POLICY;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use CARBON_INDEX_SERVER_POLICY_DEFAULT

import org.apache.carbondata.core.indexstore.ExtendedBlocklet
import org.apache.carbondata.core.scan.filter.resolver.FilterResolverIntf

class DistributedDataMapJob extends AbstractDataMapJob {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this class in spark2 integration module? Can't put in carbondata-core?

import org.apache.carbondata.spark.rdd.CarbonRDD


class DistributedPruneRDD(@transient private val ss: SparkSession,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

write comment please


override def internalCompute(split: Partition,
context: TaskContext): Iterator[(String, ExtendedBlocklet)] = {
Nil.iterator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No implementation?

throw new InvalidConfigurationException("Spark master URL is not set.")
}
val spark = SparkSession
.builder().config(new SparkConf())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move config together

}

object IndexServer extends ServerInterface {
val prunePolicy: String = CarbonProperties.getInstance().getIndexServerPolicy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use these variables in main directly, no need to declare local variables

}

def getClient: ServerInterface = {
import org.apache.hadoop.ipc.RPC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to head


private val serverPort: Int = CarbonProperties.getInstance().getIndexServerPort

def getSplits(request: DistributableDataMapFormat): Array[(String, ExtendedBlocklet)] = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no override?

@kunal642
Copy link
Contributor Author

@jackylk This is the old PR..Can you review the new PR #3177 instead of this. I will handle the comments of this PR in 3177

@kunal642 kunal642 closed this Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants