@Override public void addBroadcastCost(EstimateProvider estimates, int replicationFactor, Costs costs) { // if our replication factor is negative, we cannot calculate broadcast costs if (replicationFactor <= 0) { throw new IllegalArgumentException("The replication factor of must be larger than zero."); } if (replicationFactor > 0) { // assumption: we need ship the whole data over the network to each node. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(replicationFactor * estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 10 * replicationFactor); } else { costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 1000); } }
@Override public void addHashPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addRandomPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addRangePartitionCost(EstimateProvider estimates, Costs costs) { final long dataSize = estimates.getEstimatedOutputSize(); if (dataSize > 0) { // Assume sampling of 10% of the data and spilling it to disk final long sampled = (long) (dataSize * 0.1f); // set shipping costs costs.addNetworkCost(dataSize + sampled); } else { costs.setNetworkCost(Costs.UNKNOWN); } // no costs known. use the same assumption as above on the heuristic costs final long sampled = (long) (HEURISTIC_COST_BASE * 0.1f); costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE + sampled); costs.addHeuristicDiskCost(2 * sampled); }
@Override public void addBroadcastCost(EstimateProvider estimates, int replicationFactor, Costs costs) { // if our replication factor is negative, we cannot calculate broadcast costs if (replicationFactor <= 0) { throw new IllegalArgumentException("The replication factor of must be larger than zero."); } if (replicationFactor > 0) { // assumption: we need ship the whole data over the network to each node. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(replicationFactor * estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 10 * replicationFactor); } else { costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 1000); } }
@Override public void addBroadcastCost(EstimateProvider estimates, int replicationFactor, Costs costs) { // if our replication factor is negative, we cannot calculate broadcast costs if (replicationFactor <= 0) { throw new IllegalArgumentException("The replication factor of must be larger than zero."); } if (replicationFactor > 0) { // assumption: we need ship the whole data over the network to each node. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(replicationFactor * estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 10 * replicationFactor); } else { costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 1000); } }
@Override public void addBroadcastCost(EstimateProvider estimates, int replicationFactor, Costs costs) { // if our replication factor is negative, we cannot calculate broadcast costs if (replicationFactor <= 0) { throw new IllegalArgumentException("The replication factor of must be larger than zero."); } if (replicationFactor > 0) { // assumption: we need ship the whole data over the network to each node. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(replicationFactor * estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 10 * replicationFactor); } else { costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 1000); } }
@Override public void addBroadcastCost(EstimateProvider estimates, int replicationFactor, Costs costs) { // if our replication factor is negative, we cannot calculate broadcast costs if (replicationFactor <= 0) { throw new IllegalArgumentException("The replication factor of must be larger than zero."); } if (replicationFactor > 0) { // assumption: we need ship the whole data over the network to each node. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(replicationFactor * estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 10 * replicationFactor); } else { costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE * 1000); } }
@Override public void addRandomPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addRandomPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addHashPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addHashPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addHashPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addRandomPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addHashPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addRandomPartitioningCost(EstimateProvider estimates, Costs costs) { // conservative estimate: we need ship the whole data over the network to establish the // partitioning. no disk costs. final long estOutShipSize = estimates.getEstimatedOutputSize(); if (estOutShipSize <= 0) { costs.setNetworkCost(Costs.UNKNOWN); } else { costs.addNetworkCost(estOutShipSize); } costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE); }
@Override public void addRangePartitionCost(EstimateProvider estimates, Costs costs) { final long dataSize = estimates.getEstimatedOutputSize(); if (dataSize > 0) { // Assume sampling of 10% of the data and spilling it to disk final long sampled = (long) (dataSize * 0.1f); // set shipping costs costs.addNetworkCost(dataSize + sampled); } else { costs.setNetworkCost(Costs.UNKNOWN); } // no costs known. use the same assumption as above on the heuristic costs final long sampled = (long) (HEURISTIC_COST_BASE * 0.1f); costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE + sampled); costs.addHeuristicDiskCost(2 * sampled); }
@Override public void addRangePartitionCost(EstimateProvider estimates, Costs costs) { final long dataSize = estimates.getEstimatedOutputSize(); if (dataSize > 0) { // Assume sampling of 10% of the data and spilling it to disk final long sampled = (long) (dataSize * 0.1f); // set shipping costs costs.addNetworkCost(dataSize + sampled); } else { costs.setNetworkCost(Costs.UNKNOWN); } // no costs known. use the same assumption as above on the heuristic costs final long sampled = (long) (HEURISTIC_COST_BASE * 0.1f); costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE + sampled); costs.addHeuristicDiskCost(2 * sampled); }
@Override public void addRangePartitionCost(EstimateProvider estimates, Costs costs) { final long dataSize = estimates.getEstimatedOutputSize(); if (dataSize > 0) { // Assume sampling of 10% of the data and spilling it to disk final long sampled = (long) (dataSize * 0.1f); // set shipping costs costs.addNetworkCost(dataSize + sampled); } else { costs.setNetworkCost(Costs.UNKNOWN); } // no costs known. use the same assumption as above on the heuristic costs final long sampled = (long) (HEURISTIC_COST_BASE * 0.1f); costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE + sampled); costs.addHeuristicDiskCost(2 * sampled); }
@Override public void addRangePartitionCost(EstimateProvider estimates, Costs costs) { final long dataSize = estimates.getEstimatedOutputSize(); if (dataSize > 0) { // Assume sampling of 10% of the data and spilling it to disk final long sampled = (long) (dataSize * 0.1f); // set shipping costs costs.addNetworkCost(dataSize + sampled); } else { costs.setNetworkCost(Costs.UNKNOWN); } // no costs known. use the same assumption as above on the heuristic costs final long sampled = (long) (HEURISTIC_COST_BASE * 0.1f); costs.addHeuristicNetworkCost(HEURISTIC_COST_BASE + sampled); costs.addHeuristicDiskCost(2 * sampled); }