Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by praveendevarao on 12/01/16. | |
*/ | |
import org.apache.spark._ | |
import org.apache.spark.storage.StorageLevel | |
import org.apache.spark.streaming._ | |
import org.apache.spark.streaming.StreamingContext._ | |
object WordCount { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ibm.kafka.test; | |
import org.apache.kafka.clients.consumer.ConsumerRecord; | |
import org.apache.kafka.clients.consumer.ConsumerRecords; | |
import org.apache.kafka.clients.consumer.KafkaConsumer; | |
import org.apache.kafka.common.PartitionInfo; | |
import org.apache.kafka.common.TopicPartition; | |
import java.util.Arrays; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +----------------------------------------------------------------------+ | |
# | Licensed Materials - Property of IBM | | |
# | | | |
# | (C) Copyright IBM Corporation 2006, 2007, 2008, 2009, 2010 | | |
# +----------------------------------------------------------------------+ | |
# | Authors: Antonio Cangiano <cangiano@ca.ibm.com> | | |
# | : Mario Ds Briggs <mario.briggs@in.ibm.com> | | |
# | : Praveen Devarao <praveendrl@in.ibm.com> | | |
# +----------------------------------------------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-- | |
# Copyright (c) 2004-2014 David Heinemeier Hansson | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, | |
# distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so, subject to | |
# the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
+----------------------------------------------------------------------+ | |
| Licensed Materials - Property of IBM | | |
| | | |
| (C) Copyright IBM Corporation 2006, 2007,2008, 2009, 2010 | | |
+----------------------------------------------------------------------+ | |
| Authors: Sushant Koduru, Lynh Nguyen, Kanchana Padmanabhan, | | |
| Dan Scott, Helmut Tessarek, Sam Ruby, Kellen Bombardier, | | |
| Tony Cairns, Manas Dadarkar, Swetha Patel, Salvador Ledezma | | |
| Mario Ds Briggs, Praveen Devarao, Ambrish Bhargava, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InsertTestMain { | |
public static void main(String[] args) throws Exception { | |
int number_of_threads = 10; | |
String database = "mongodb"; | |
int numOfDocsToInsert = 10000; | |
String collectionName = "empCollection"; | |
Mongo m = new Mongo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.net.UnknownHostException; | |
import com.mongodb.BasicDBObject; | |
import com.mongodb.DB; | |
import com.mongodb.DBCollection; | |
import com.mongodb.DBCursor; | |
import com.mongodb.Mongo; | |
import com.mongodb.MongoException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +----------------------------------------------------------------------+ | |
# | Licensed Materials - Property of IBM | | |
# | | | |
# | (C) Copyright IBM Corporation 2006, 2007,2008,2009,2010 | | |
# +----------------------------------------------------------------------+ | |
require 'rubygems' | |
require 'pathname' | |
SPEC = Gem::Specification.new do |spec| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/core_ext/object/inclusion' | |
db_namespace = namespace :db do | |
task :load_config => :rails_env do | |
require 'active_record' | |
ActiveRecord::Base.configurations = Rails.application.config.database_configuration | |
ActiveRecord::Migrator.migrations_paths = Rails.application.paths['db/migrate'].to_a | |
if defined?(ENGINE_PATH) && engine = Rails::Engine.find(ENGINE_PATH) | |
if engine.paths['db/migrate'].existent |
NewerOlder