Pages

Wednesday, 31 March 2021

How to Install and Uninstall Java on Ubuntu

Step1: Installing Java on Ubuntu

You can install one or several Java packages. You can also decide which version you want on your system by installing a specific version number. The current default and LTS version is Java 11.

Install OpenJDK

1. Open the terminal (Ctrl+Alt+T) and update the package repository to ensure you download the latest software version:

sudo apt update

2. Then, you can confidently install the latest Java Development Kit with the following command:

sudo apt install default-jdk

Install Specific Version of OpenJDK

You may decide to use Open JDK 8, instead of the default OpenJDK 11.

To do so, open the terminal and type in the following command:

sudo apt install openjdk-8-jdk

Once the installation process is complete, verify the current Java version:

java -version; javac -version

How to find the OpenJDK directory with the following command:

readlink -f /usr/bin/javac

How to Set Default Java Version

As you can have multiple versions of Java installed on your system, you can decide which one is the default one.First, run a command that shows all the installed versions on your computer:

sudo update-alternatives --config java

step 2: Uninstall Java on Ubuntu

In case you need to remove any of the Java packages installed, use the apt remove or purge command. To remove Open JDK 11, run the command:

sudo apt remove default-jdk

To uninstall OpenJDK 8:

sudo apt remove openjdk-8-jdk

2nd Method:

1. sudo dpkg --list | grep -i jdk 

2. sudo apt-get purge Oracle-java8-installer

Friday, 26 March 2021

Introduction to Big Data and Why to use Big Data Technology

Data :

The quantities, characters, or symbols on which operations are performed by a computer, which may be stored and transmitted in the form of electrical signals and recorded on magnetic, optical, or mechanical recording media.

What is Big Data :


Big Data: 

Big Data is defined as data that is huge in size. BigData is a term used to describe a collection of data that is huge in size and yet growing exponentially with time.

It is data with so large size and complexity that none of the traditional data management tools can store it or process it efficiently

Examples Of Big Data

The New York Stock Exchange generates about one terabyte(TB) of new trade data per day.

The statistic shows that 500+terabytes of new data get ingested into the databases of social media site Facebook, every day. This data is mainly generated in terms of photo and video uploads, message exchanges, putting comments etc.



Different Languages used in computer science era are as shown below 


The use of the above different languages are

Hadoop  Founders :

When to use Hadoop :

Wednesday, 24 March 2021

How to connect to Windows 10 using OpenSSH Server

 Step 1:Click on Start and then type App & feature in the search  

Step 2:Click on Optional Features under App & feature

Step 3:Click on OpenSSH Server and install it   

Step 4:Click on Start and under search type Services App

Step 5:Click on OpenSSH Server and change the option from manual to automatic and then click on start   

Step 6:Now run the OpenSSh Server under the cmd prompt as shown by typing the password Thus the Open SSh server is now accessed from it 


Tuesday, 23 March 2021

Big Data Characteristics

Big Data Characteristics : (Volume, Velocity, Variety ,Veracity,Validity and  value...)

For a dataset to be considered Big Data, it must possess one or more characteristics that require accommodation in the solution design and architecture of the analytic environment.

This explores the five Big Data characteristics that can be used to help differentiate data categorized as “Big” from other forms of data.

1. Volume – Scale of Data

       The name ‘Big Data’ itself is related to a size which is enormous.Volume is a huge amount of data.To determine the value of data, size of data plays a very crucial role. If the volume of data is very large then it is actually considered as a ‘Big Data’. This means whether a particular data can actually be considered as a Big Data or not, is dependent upon the volume of data.Hence while dealing with Big Data it is necessary to consider a characteristic ‘Volume’.

Example: Typical data sources that are responsible for generating high data volumes can include:

• online transactions, such as point-of-sale and banking

• scientific and research experiments.

• sensors, such as Global Positioning System(GPS), RFIDs, smart meters and telematics.

• social media, such as Facebook and Twitter.

2. Velocity – Speed of Data
      Velocity refers to the high speed of accumulation of data. In Big Data velocity data flows in from sources like machines, networks, social media, mobile phones etc.

There is a massive and continuous flow of data. This determines the potential of data that how fast the data is generated and processed to meet the demands.Sampling data can help in dealing with the issue like ‘velocity’.

Example: There are more than 3.5 billion searches per day are made on Google. Also, Facebook users are increasing by 22%(Approx.) year by year.

3. Variety – Diversity of Data
    It refers to nature of data that is structured, semi-structured and unstructured data.It also refers to heterogeneous sources.Variety is basically the arrival of data from new sources that are both inside and outside of an enterprise. It can be structured, semi-structured and unstructured.

Structured data: This data is basically an organized data. It generally refers to data that has defined the length and format of data.

Semi- Structured data: This data is basically a semi-organized data. It is generally a form of data that do not conform to the formal structure of data. Log files are the examples of this type of data.

Unstructured data: This data basically refers to unorganized data. It generally refers to data that doesn’t fit neatly into the traditional row and column structure of the relational database. Texts, pictures, videos etc. are the examples of unstructured data which can’t be stored in the form of rows and columns.


Note: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax. It is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa).

4. Veracity – Trustworthiness of Data
    It refers to inconsistencies and uncertainty in data, that is data which is available can sometimes get messy and quality and accuracy are difficult to control.
    Data that is acquired in a controlled manner, for example via online customer registrations, usually contains less noise than data acquired via uncontrolled sources, such as blog postings.
    
Example: Data in bulk could create confusion whereas less amount of data could convey half or Incomplete Information.

5. Variability – Inconsistency of Data
    Variability refers to the changes in data flow rates, formats, or meanings over time. For instance, during sales events or trending news, data may spike drastically. Additionally, words or behavior may have different meanings in different contexts, making interpretation harder.

Example: if you are eating same ice-cream daily and the taste just keep changing. 

6. Value – Usefulness of Data
    After having the 5V’s into account there comes one more V which stands for Value. The bulk of Data having no Value is of no good to the company, unless you turn it into something useful.
      Data in itself is of no use or importance but it needs to be converted into something valuable to extract Information. Hence, you can state that Value! is the most important V of all the 6V’s.

Big Data Analytics

Big Data Analytics

Big data analytics examines large and different types of data to uncover hidden patterns, correlations, and other insights. Basically, Big Data Analytics is largely used by companies to facilitate their growth and development. This majorly involves applying various data mining algorithms on the given set of data, which will then aid them in better decision making.

Stages in Big Data Analytics

These are the following stages involved in the Big Data Analytics process:

Big Data Analytics: There are four general categories of analytics that are distinguished by the results they produce:

1. Descriptive Analytics        .......... hindsight

2. Diagnostic Analytics         ..........  insight

3. Predictive Analytics          ..........  insight

4. Prescriptive Analytics      ..........  foresight

Note:

Online Analytical Processing (OLAP) –
Online Analytical Processing consists of a type of software tools that are used for data analysis for business decisions. OLAP provides an environment to get insights from the database retrieved from multiple database systems at one time.

Examples – Any type of Data warehouse system is an OLAP system. Uses of OLAP are as follows:

  • Spotify analyzed songs by users to come up with the personalized homepage of their songs and playlist.

  • Netflix movie recommendation system.

Online Transaction Processing (OLTP) –
Online transaction processing provides transaction-oriented applications in a 3-tier architecture. OLTP administers day to day transaction of an organization.

Examples – Uses of OLTP are as follows:

  • ATM center is an OLTP application.

  • OLTP handles the ACID properties during data transaction via the application.

  • It’s also used for Online banking, Online airline ticket booking, sending a text message, add a book to the shopping cart.

1. Descriptive Analytics :

Descriptive analytics is carried out to answer questions about events that have already occurred. This form of analytics contextualizes data to generate information.

The reports are generally static in nature and display historical data that is presented in the form of data grids or charts. Queries are executed on operational data stores from within an enterprise, 

For example, Online Transaction Processing (OLTP) , a Customer Relationship Management system (CRM) , Enterprise Resource Planning (ERP) system.

Sample questions can include:

•What was the sales volume over the past 12 months?

•What is the number of support calls received as categorized by severity and geographic location?

•What is the monthly commission earned by each sales agent?

It is estimated that 80% of generated analytics results are descriptive in nature.

2. Diagnostic Analytics :

Diagnostic Analytics aims to determine the cause of a phenomenon that occurred in the past using questions that focus on the reason behind the event. 

The goal of this type of analytics is to determine what information is related to the phenomenon in order to enable answering questions that seek to determine why something has occurred.

Diagnostic analytics usually requires collecting data from multiple sources and storing it in a structure that lends itself to performing drill-down and roll-up analysis.

Diagnostic analytics results are viewed via interactive visualization tools that enable users to identify trends and patterns. The executed queries are more complex compared to those of descriptive analytics and are performed on multidimensional data held in analytic processing systems.



Such questions include:
•Why were Q2 sales less than Q1 sales?
•Why have there been more support calls originating from the Eastern region than from the Western region?
•Why was there an increase in patient readmission rates over the past three months?

3. Predictive Analytics :
Predictive analytics are carried out in an attempt to determine the outcome of an event that might occur in the future. With predictive analytics, information is enhanced to generate knowledge that conveys how that information is related.

It is important to understand that the models used for predictive analytics have implicit dependencies on the conditions under which the past events occurred. If these underlying conditions change, then the models that make predictions need to be updated.

Predictive analytics try to predict the outcomes of events, and predictions are made based on patterns, trends, and exceptions found in historical and current data. This can lead to the identification of both risks and opportunities. 

This kind of analytics involves the use of large datasets comprised of internal and external data and various data analysis techniques.

Questions are usually formulated such as :
•What are the chances that a customer will default on a loan if they have missed a monthly payment?
•What will be the patient survival rate if Drug B is administered instead of Drug A?
•If a customer has purchased Products A and B, what are the chances that they will also purchase Product C?

4. Prescriptive Analytics :
Prescriptive analytics builds upon the results of predictive analytics by prescribing actions that should be taken. 

Prescriptive analytics provide more value than any other type of analytics and correspondingly require the most advanced skillset, as well as specialized software and tools.

Internal data might include current and historical sales data, customer information, product data, and business rules. 
External data may include social media data, weather forecasts and government-produced demographic data. 

Prescriptive analytics involves the use of business rules and large amounts of internal and external data to simulate outcomes and prescribe the best course of action.

Sample questions may include:
• Among three drugs, which one provides the best results?
• When is the best time to trade a particular stock?

How to install ubuntu operating system in windows10 without using virtualbox or any other third party software.


Step1:
Open control panel and then click on Programs 


Step 2:
Click on Turn Windows Feature on or off and then select Windows subsystem for Linux



Step 3:
Click on start and then type Microsoft store in the search 

Step 4:
After that  Go to Microsoft store and type ubuntu (Use red color logo don't download blue color) and get downloaded file from it 


After installing ubuntu Type this command to know the version of ubuntu  

lsb_release -a


UNIX

 

Operating System:

Operating System is the system software that manages computer hardware, resources, and provides services for computer programs.

 How operating system works?

Operating system is loaded into memory when a computer is booted and remains active as long as machine is up. After any program has completed execution, the operating system cleans up the memory and registers and makes them available for the next program.

Examples of operating system:

Microsoft Windows, UNIX, Linux, MacOS, IBM AIX, Solaris etc

 UNIX:

UNIX is a portable, multitasking, multiuser, time sharing operating system.

Founder of UNIX

The UNIX was founded by Ken Thompson, Dennis Ritchie and Brain

kerninghan at AT & T Bell Labs research in 1969.

Founder of LINUX

Linus Benedict Torvalds in 1991.

 Difference between UNIX and LINUX (linux is a unix clone)

UNIX

LINUX

Originally the Bourne Shell. Now it's compatible with many others including BASH, Korn & C.

BASH (Bourne Again SHell) is the Linux default shell. It can support multiple command interpreters.

Developed by ken Thompson, Dennis

Developed by ken Thompson, Dennis

Unix is majorly used on workstations and servers.

It is used in several systems like desktop, smartphones, mainframes and servers.

It can be microkernel, monolithic, and hybrid.

It is monolithic.

Solaris, HP UNIX, Ubuntu, Fedora are some versions.

Solaris, HP UNIX are some versions. Ubuntu, Fedora are some versions.

The source is not accessible to the general public.

The source is accessible to the general public.

 

Need of UNIX:

Network capability:

With other OS, additional software must be purchased for networking but with UNIX, network capability is the part of the operating system. 

 History of UNIX

Ø 1960 Bell labs involved in the project with MIT, General Electric and Bell

    Laboratories to develop a time-sharing system called MULTICS

     (Multiplexed Operating and Computing System).

Ø 1969 Ken Thompson wrote the first version of the UNIX called UNICS

         (Uniplexed Information and Computing System)

Ø 1970 Finally UNICS became UNIX. 

Differences between UNIX and DOS

UNIX

DOS

UNIX can have GUI

DOS Can’t have GUI

UNIX is more secure

DOS is not more secure compared to UNIX

UNIX is multitasking

DOS is single tasking

UNIX are multiuser

DOS is single user

UNIX is case sensitive

DOS is not case sensitive

UNIX is used in servers

DOS is used in embedded systems

Differences between UNIX and Windows

UNIX

WINDOWS

UNIX has very high security system

Windows has low security system

The file system is arranged in hierarchical manner

The file system is arranged in parallel manner

UNIX is not a user friendly

Windows is a user friendly

Low Hardware cost

High Hardware cost

Customizable add features

Not customizable

Features of UNIX:

Ø  Multiuser support: UNIX allows multiple users to simultaneously access the same system and share resources.

Ø  Multitasking: UNIX is capable of running multiple processes at the same time.

Ø  Shell scripting: UNIX provides a powerful scripting language that allows users to automate tasks.

Ø  Security: UNIX has a robust security model that includes file permissions, user accounts, and network security features.

Ø  Portability: UNIX can run on a wide variety of hardware platforms, from small embedded systems to large mainframe computers.

Unix Architecture:

Basic block diagram of a UNIX system:

The Unix architecture has 4 layers. These layers are:

Layer – 1:

Hardware: The lowest layer of the Unix architecture is the hardware layer, which provides the physical components of the computer, such as the CPU, memory, and disk drives. The hardware layer communicates with the operating system through device drivers, which are software modules that provide a standard interface between the hardware and the operating system.

Layer – 2:

Kernel: This is the most powerful layer of the Unix architecture. The kernel is responsible for acting as an interface with the hardware for the effective utilization. The kernel handles the hardware effectively by using the device drivers. The kernel is also responsible for process management, file management, memory management, etc.

Layer-3:

Shell: The Shell is a collection of UNIX Commands. The Shell acts as an interface between the user and the kernel. The shell is the utility that processes your requests. When you type in a command at your terminal, the shell interprets the command and calls the program that you want. Types of shells are:

Ø  Bourne shell (sh)

Ø  Korn Shell (ksh)

Ø  Bourne Again shell (bash)

Ø  POSIX shell (sh)

Ø  C Shell

Bourne Shell: Bourne shell is known as the first shell to be introduced, it is represented by “sh”. This shell got popular because of its quite compact nature. It was made the default shell for the SOLARIS operating system and was used as a Solaris administration script. It has very high-speed operations. Bourne’s shell was not able to handle logical and arithmetic operations.

Ø  Path Name: /bin/sh or /sbin/sh

Ø  Prompt for the root user: #

Ø  Prompt for the non-root user: $

Korn Shell: This shell was developed by David Korn in AT & T bells lab, this was introduced as an improved version or superset of the Bourne shell. It is represented by “ksh”. It has all the features and functionalities of Bourne Shell and also provides some new functionalities to the users. Korn shell has in-built support for arithmetic operations. 

Ø  Path Name: /bin/ksh

Ø  Prompt for the root user: #

Ø  Prompt for the non-root user: $

Bourne Again Shell: It is also known as Bash Shell, this shell combines features of the Korn shell and C shell. This shell was designed as an extended version of the Bourne shell. Bourne Again Shell can automatically load previously used commands and can be edited with the help of the arrow keys of the keyboard.

Ø  Path Name: /bin/bash

Ø  Prompt for the root user: bash-VersionNumber#

Ø  Prompt for the non-root user: bash-VersionNumber$

C Shell: The C shell was designed by Bill Joy at the University of California. It is represented using “csh”. The C shell was designed with the purpose of supporting programming languages. It was specifically designed to support in-built features like solving arithmetic operations and syntax of programming languages like C. Unlike Bourne and other Linux shells, the C shell can maintain and history of previously used commands, and those commands can be used whenever required.

Ø  Path Name: /bin/csh

Ø  Prompt for the root user: hostname#

Ø  Prompt for the non-root user: hostname%

Layer-4:

Application Layer: The last layer of the Unix architecture is the Application Program layer. This outermost layer of Unix Architecture is responsible for executing the application programs.

Friends-of-friends-Map Reduce program

Program to illustrate FOF Map Reduce: import java.io.IOException; import java.util.*; import org.apache.hadoop.conf.Configuration; import or...