Thursday, August 4, 2016

Java HotSpot(TM) Client VM warning: Cannot open file /cassandra37/logs/gc.log due to No such file or directory

Error
Java HotSpot(TM) Client VM warning: Cannot open file /cassandra37/logs/gc.log due to No such file or directory

Problem 
Log directory not exists

Solution
Create Log Directory at specified path

Problem
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

No single argument constructor found for class [Ljava.lang.String;; in 'reader', line 10, column 1:

No single argument constructor found for class [Ljava.lang.String;;  in 'reader', line 10, column 1:
   cluster_name: 'Test Cluster'

Problem:
While modification of cassandra.yaml file you might change the format of given directories

Solution:
Change directories path format as given below (it should be exactly same)

data_file_directories:
    - /cassandra/storage/data
commitlog_directory: /cassandra/storage/commitlog
saved_caches_directory: /cassandra/storage/saved_caches

Workaround
In my case i have written data_file_directories as below
data_file_directories: /cassandra/storage/data
When i change path as per given format, then it works fine for me.

Wednesday, August 3, 2016

WARNING! Powershell script execution unavailable.

Error

WARNING! Powershell script execution unavailable.
   Please use 'powershell Set-ExecutionPolicy Unrestricted'
   on this user-account to run cassandra with fully featured
   functionality on this platform.

 
Problem
PowerShell have four type of execution modes (Restricted, All Signed, Remote Signed, Unrestricted).
Currently your's machine Powershell Execution mode is set to Restricted.

Solution
Change powershell execution mode for this first open PowerShell with administrative rights "Run as Administrator".

Set-ExecutionPolicy Restricted


Check
Check status of execution mode of Powershell using below command
Unrestricted" goto runPowerShell

Friday, July 29, 2016

How to load data in hadoop?

We need to use HIVE to create table and load data. I am using some pre-downloaded files, after search alot on google. As all the files have data in tab seprated form.


  1. Create table from HIVE
  2. Move to Hadoop_Home and where we need to move the files from root directory to specified directory
  3. Move to HIVE shell
  4. and using Load command, load data into tables.


create table users (id STRING, birth_date STRING, gender STRING) ROW FORMAT DELIMITED FIELDS TERMINATED by '\t' stored as textfile tblproperties ("skip.header.line.count"="1");

create table products (url STRING, category STRING) ROW FORMAT DELIMITED FIELDS TERMINATED by '\t' stored as textfile tblproperties ("skip.header.line.count"="1");

hadoop fs -put /urlmap.tsv /user/hadoop/products.tsv
hadoop fs -put /regusers.tsv /user/hadoop/users.tsv

hive>
LOAD DATA INPATH '/user/hadoop/products.tsv' OVERWRITE INTO TABLE products;
LOAD DATA INPATH '/user/hadoop/users.tsv' OVERWRITE INTO TABLE users;


Wednesday, July 27, 2016

How to clear cache of run (saved password of shared folder)


Follow below steps to resolve the problem:
  1. Open cmd
  2. Execute command "net use"
  3. Copy string from Remote column, IP address of server whose cache you want to delete
  4. Execute below command
    • net use \\192.168.1.1\folder(paste your string copied in step 3) /delete
  5. Now on re-execution of net use command, you can see the string entry get removed
  6. Now go to task manager
    • kill explorer.exe and starting it again.
web stats