public void doGet(HttpServletRequest req, HttpServletResponse resp) {
		resp.setContentType("text/plain");

		String queueName = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.QUEUE_NAME_PARAM);
		String bigqueryProjectId = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.BIGQUERY_PROJECT_ID_PARAM);
		String bigqueryDatasetId = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.BIGQUERY_DATASET_ID_PARAM);
		String bigqueryTableId = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.BIGQUERY_TABLE_ID_PARAM);
		String schemaHash = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.SCHEMA_HASH_PARAM);

		MemcacheService memcache = MemcacheServiceFactory
				.getMemcacheService(AnalysisConstants.MEMCACHE_NAMESPACE);
		Long nextBigQueryJobTime = (Long) memcache.increment(
				AnalysisConstants.LAST_BIGQUERY_JOB_TIME,
				AnalysisConstants.LOAD_DELAY_MS, System.currentTimeMillis());

		long currentTime = System.currentTimeMillis();

		// The task queue has waited a long time to run us. Go ahead and reset
		// the last job time
		// to prevent a race.
		if (currentTime > nextBigQueryJobTime + AnalysisConstants.LOAD_DELAY_MS
				/ 2) {
			memcache.put(AnalysisConstants.LAST_BIGQUERY_JOB_TIME, currentTime);
			nextBigQueryJobTime = currentTime + AnalysisConstants.LOAD_DELAY_MS;
		}
		if (currentTime < nextBigQueryJobTime) {
			memcache.increment(AnalysisConstants.LAST_BIGQUERY_JOB_TIME,
					-AnalysisConstants.LOAD_DELAY_MS);
			Queue taskQueue = QueueFactory.getQueue(queueName);
			taskQueue.add(Builder
					.withUrl(
							AnalysisUtility.getRequestBaseName(req)
									+ "/loadCloudStorageToBigquery?"
									+ req.getQueryString()).method(Method.GET)
					.etaMillis(nextBigQueryJobTime));
			log.info("Rate limiting BigQuery load job - will retry at "
					+ nextBigQueryJobTime);
			return;
		}

		String bucketName = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.BUCKET_NAME_PARAM);

		AppIdentityCredential credential = new AppIdentityCredential(
				AnalysisConstants.SCOPES);

		HttpRequestFactory requestFactory = HTTP_TRANSPORT
				.createRequestFactory(credential);

		List<String> urisToProcess = new ArrayList<String>();

		String startMsStr = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.START_MS_PARAM);
		long startMs = Long.parseLong(startMsStr);

		String endMsStr = AnalysisUtility.extractParameterOrThrow(req,
				AnalysisConstants.END_MS_PARAM);
		long endMs = Long.parseLong(endMsStr);

		try {
			urisToProcess = AnalysisUtility.fetchCloudStorageLogUris(bucketName, schemaHash,
					startMs, endMs, requestFactory);
			log.info("Got " + urisToProcess.size() + " uris to process");

			if (urisToProcess.isEmpty()) {
				log.info("No URI's to process");
				return;
			}

			for (String uri : urisToProcess) {
				log.info("URI: " + uri);
			}

			Bigquery bigquery = new Bigquery.Builder(HTTP_TRANSPORT,
					JSON_FACTORY, credential).setApplicationName(
					SystemProperty.applicationId.get()).build();

			Job job = new Job();

			JobConfiguration config = new JobConfiguration();
			JobConfigurationLoad loadConfig = new JobConfigurationLoad();

			loadConfig.setSourceUris(urisToProcess);
			loadConfig.set("allowQuotedNewlines", true);
			loadConfig.setSourceFormat("NEWLINE_DELIMITED_JSON");

			ObjectMapper mapper = new ObjectMapper();
			List<TableFieldSchema> schemaFields = mapper.readValue(
					loadSchemaString("gs://" + bucketName + "/" + schemaHash
							+ ".schema.json"),
					new TypeReference<List<TableFieldSchema>>() {
					});
			TableSchema tableSchema = new TableSchema().setFields(schemaFields);
			loadConfig.setSchema(tableSchema);

			TableReference table = new TableReference();
			table.setProjectId(bigqueryProjectId);
			table.setDatasetId(bigqueryDatasetId);
			table.setTableId(bigqueryTableId);

			loadConfig.setDestinationTable(table);

			config.setLoad(loadConfig);
			job.setConfiguration(config);
			Insert insert = bigquery.jobs().insert(bigqueryProjectId, job);

			// TODO(frew): Not sure this is necessary, but monkey-see'ing the
			// example code
			insert.setProjectId(bigqueryProjectId);
			JobReference ref = insert.execute().getJobReference();
			log.info("Successfully started job " + ref);

			String shouldDeleteString = req
					.getParameter(AnalysisConstants.DELETE_FROM_CLOUD_STORAGE_PARAM);
			boolean shouldDelete = (AnalysisUtility
					.areParametersValid(shouldDeleteString) && shouldDeleteString
					.equals("true"))
					|| System.getProperty(
							"bigquerylogging.default.deleteFromCloudStorage")
							.equals("true");

			if (shouldDelete) {
				Queue taskQueue = QueueFactory.getQueue(queueName);
				taskQueue
						.add(Builder
								.withUrl(
										AnalysisUtility.getRequestBaseName(req)
												+ "/deleteCompletedCloudStorageFilesTask")
								.method(Method.GET)
								.param(AnalysisConstants.BIGQUERY_JOB_ID_PARAM,
										ref.getJobId())
								.param(AnalysisConstants.QUEUE_NAME_PARAM,
										queueName)
								.param(AnalysisConstants.BIGQUERY_PROJECT_ID_PARAM,
										bigqueryProjectId));
			}
		} catch (IOException e) {
			log.warning("An error occurred while loading cloud storage to Bigquery. Retrying.");
			Queue taskQueue = QueueFactory.getQueue(queueName);
			taskQueue.add(Builder.withUrl(req.getRequestURL().toString()));
		}
	}