关闭

关闭

封号提示

内容

首页 OReilly.Cassandra.The.Definitive.Guide.2010.pdf

OReilly.Cassandra.The.Definitive.Guide.2010.pdf

OReilly.Cassandra.The.Definitiv…

上传者: ronnin.lee 2012-02-14 评分1 评论0 下载29 收藏0 阅读量696 暂无简介 简介 举报

简介:本文档为《OReilly.Cassandra.The.Definitive.Guide.2010pdf》,可适用于专题技术领域,主题内容包含Cassandra:TheDefinitiveGuideCassandra:TheDefinitiveGuideEbenHewittBeijing•符等。

Cassandra:TheDefinitiveGuideCassandra:TheDefinitiveGuideEbenHewittBeijing•Cambridge•Farnham•Köln•Sebastopol•TokyoCassandra:TheDefinitiveGuidebyEbenHewittCopyrightEbenHewittAllrightsreservedPrintedintheUnitedStatesofAmericaPublishedbyO’ReillyMedia,Inc,GravensteinHighwayNorth,Sebastopol,CAO’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluseOnlineeditionsarealsoavailableformosttitles(http:mysafaribooksonlinecom)Formoreinformation,contactourcorporateinstitutionalsalesdepartment:()orcorporateoreillycomEditor:MikeLoukidesProductionEditor:HollyBauerCopyeditor:Genevieved’EntremontProofreader:EmilyQuillIndexer:EllenTroutmanZaigCoverDesigner:KarenMontgomeryInteriorDesigner:DavidFutatoIllustrator:RobertRomanoPrintingHistory:November:FirstEditionNutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,IncCassandra:TheDefinitiveGuide,theimageofaParadiseflycatcher,andrelatedtradedressaretrademarksofO’ReillyMedia,IncManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andO’ReillyMedia,Incwasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcapsWhileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedhereinTMThisbookusesRepKover,adurableandflexiblelayflatbindingISBN:MThisbookisdedicatedtomysweetheart,AlisonBrownIcanhearthesoundofviolins,longbeforeitbeginsTableofContentsForewordxvPrefacexviiIntroducingCassandraWhat’sWrongwithRelationalDatabasesAQuickReviewofRelationalDatabasesRDBMS:TheAwesomeandtheNotSoMuchWebScaleTheCassandraElevatorPitchCassandrainWordsorLessDistributedandDecentralizedElasticScalabilityHighAvailabilityandFaultToleranceTuneableConsistencyBrewer’sCAPTheoremRowOrientedSchemaFreeHighPerformanceWhereDidCassandraComeFromUseCasesforCassandraLargeDeploymentsLotsofWrites,Statistics,andAnalysisGeographicalDistributionEvolvingApplicationsWhoIsUsingCassandraSummaryInstallingCassandraInstallingtheBinaryExtractingtheDownloadviiWhat’sInThereBuildingfromSourceAdditionalBuildTargetsBuildingwithMavenRunningCassandraOnWindowsOnLinuxStartingtheServerRunningtheCommandLineClientInterfaceBasicCLICommandsHelpConnectingtoaServerDescribingtheEnvironmentCreatingaKeyspaceandColumnFamilyWritingandReadingDataSummaryTheCassandraDataModelTheRelationalDataModelASimpleIntroductionClustersKeyspacesColumnFamiliesColumnFamilyOptionsColumnsWideRows,SkinnyRowsColumnSortingSuperColumnsCompositeKeysDesignDifferencesBetweenRDBMSandCassandraNoQueryLanguageNoReferentialIntegritySecondaryIndexesSortingIsaDesignDecisionDenormalizationDesignPatternsMaterializedViewValuelessColumnAggregateKeySomeThingstoKeepinMindSummaryviii|TableofContentsSampleApplicationDataDesignHotelAppRDBMSDesignHotelAppCassandraDesignHotelApplicationCodeCreatingtheDatabaseDataStructuresGettingaConnectionPrepopulatingtheDatabaseTheSearchApplicationTwissandraSummaryTheCassandraArchitectureSystemKeyspacePeertoPeerGossipandFailureDetectionAntiEntropyandReadRepairMemtables,SSTables,andCommitLogsHintedHandoffCompactionBloomFiltersTombstonesStagedEventDrivenArchitecture(SEDA)ManagersandServicesCassandraDaemonStorageServiceMessagingServiceHintedHandoffManagerSummaryConfiguringCassandraKeyspacesCreatingaColumnFamilyTransitioningfromtoReplicasReplicaPlacementStrategiesSimpleStrategyOldNetworkTopologyStrategyNetworkTopologyStrategyReplicationFactorIncreasingtheReplicationFactorPartitionersTableofContents|ixRandomPartitionerOrderPreservingPartitionerCollatingOrderPreservingPartitionerByteOrderedPartitionerSnitchesSimpleSnitchPropertyFileSnitchCreatingaClusterChangingtheClusterNameAddingNodestoaClusterMultipleSeedNodesDynamicRingParticipationSecurityUsingSimpleAuthenticatorProgrammaticAuthenticationUsingMDEncryptionProvidingYourOwnAuthenticationMiscellaneousSettingsAdditionalToolsViewingKeysImportingPreviousConfigurationsSummaryReadingandWritingDataQueryDifferencesBetweenRDBMSandCassandraNoUpdateQueryRecordLevelAtomicityonWritesNoServerSideTransactionSupportNoDuplicateKeysBasicWritePropertiesConsistencyLevelsBasicReadPropertiesTheAPIRangesandSlicesSetupandInsertingDataUsingaSimpleGetSeedingSomeValuesSlicePredicateGettingParticularColumnNameswithGetSliceGettingaSetofColumnswithSliceRangeGettingAllColumnsinaRowGetRangeSlicesMultigetSlicex|TableofContentsDeletingBatchMutatesBatchDeletesRangeGhostsProgrammaticallyDefiningKeyspacesandColumnFamiliesSummaryClientsBasicClientAPIThriftThriftSupportforJavaExceptionsThriftSummaryAvroAvroAntTargetsAvroSpecificationAvroSummaryABitofGitConnectingClientNodesClientListRoundRobinDNSLoadBalancerCassandraWebConsoleHector(Java)FeaturesTheHectorAPIHectorSharp(C#)ChirperChiton(Python)Pelops(Java)Kundera(JavaORM)Fauna(Ruby)SummaryMonitoringLoggingTailingGeneralTipsOverviewofJMXandMBeansMBeansIntegratingJMXInteractingwithCassandraviaJMXCassandra’sMBeansTableofContents|xiorgapachecassandraconcurrentorgapachecassandradborgapachecassandragmsorgapachecassandraserviceCustomCassandraMBeansRuntimeAnalysisToolsHeapAnalysiswithJMXandJHATDetectingThreadProblemsHealthCheckSummaryMaintenanceGettingRingInformationInfoRingGettingStatisticsUsingcfstatsUsingtpstatsBasicMaintenanceRepairFlushCleanupSnapshotsTakingaSnapshotClearingaSnapshotLoadBalancingtheClusterloadbalanceandstreamsDecommissioningaNodeUpdatingNodesRemovingTokensCompactionThresholdChangingColumnFamiliesinaWorkingClusterSummaryPerformanceTuningDataStorageReplyTimeoutCommitLogsMemtablesConcurrencyCachingBufferSizesUsingthePythonStressTestxii|TableofContentsGeneratingthePythonThriftInterfacesRunningthePythonStressTestStartupandJVMSettingsTuningtheJVMSummaryIntegratingHadoopWhatIsHadoopWorkingwithMapReduceCassandraHadoopSourcePackageRunningtheWordCountExampleOutputtingDatatoCassandraHadoopStreamingToolsAboveMapReducePigHiveClusterConfigurationUseCasesRaptrcom:KeithThornhillImagini:DaveGardnerSummaryAppendix:TheNonrelationalLandscapeGlossaryIndexTableofContents|xiiiForewordCassandrawasopensourcedbyFacebookinJulyThisoriginalversionofCassandrawaswrittenprimarilybyanexemployeefromAmazonandonefromMicrosoftItwasstronglyinfluencedbyDynamo,Amazon’spioneeringdistributedkeyvaluedatabaseCassandraimplementsaDynamostylereplicationmodelwithnosinglepointoffailure,butaddsamorepowerful“columnfamily”datamodelIbecameinvolvedinDecemberofthatyear,whenRackspaceaskedmetobuildthemascalabledatabaseThiswasgoodtiming,becausealloftoday’simportantopensourcescalabledatabaseswereavailableforevaluationDespiteinitiallyhavingonlyasinglemajorusecase,Cassandra’sunderlyingarchitecturewasthestrongest,andIdirectedmyeffortstowardimprovingthecodeandbuildingacommunityCassandrawasacceptedintotheApacheIncubator,andbythetimeitgraduatedinMarch,ithadbecomeatrueopensourcesuccessstory,withcommittersfromRackspace,Digg,Twitter,andothercompaniesthatwouldn’thavewrittentheirowndatabasefromscratch,buttogetherbuiltsomethingimportantToday’sCassandraismuchmorethantheearlysystemthatpowered(andstillpowers)Facebook’sinboxsearchithasbecome“thehandsdownwinnerfortransactionprocessingperformance,”toquoteTonyBain,withadeservedreputationforreliabilityandperformanceatscaleAsCassandramaturedandbeganattractingmoremainstreamusers,itbecameclearthattherewasaneedforcommercialsupportthus,MattPfeilandIcofoundedRiptanoinAprilHelpingdriveCassandraadoptionhasbeenveryrewarding,especiallyseeingtheusesthatdon’tgetdiscussedinpublicAnotherneedhasbeenabooklikethisoneLikemanyopensourceprojects,Cassandra’sdocumentationhashistoricallybeenweakAndevenwhenthedocumentationultimatelyimproves,abooklengthtreatmentlikethiswillremainusefulxvThankstoEbenfortacklingthedifficulttaskofdistillingtheartandscienceofdevelopingagainstanddeployingCassandraYou,thereader,havetheopportunitytolearnthesenewconceptsinanorganizedfashionJonathanEllisProjectChair,ApacheCassandra,andCofounder,Riptanoxvi|ForewordPrefaceWhyApacheCassandraApacheCassandraisafree,opensource,distributeddatastoragesystemthatdifferssharplyfromrelationaldatabasemanagementsystemsCassandrafirststartedasanincubationprojectatApacheinJanuaryofShortlythereafter,thecommitters,ledbyApacheCassandraProjectChairJonathanEllis,releasedversionofCassandra,andhavesteadilymademinorreleasessincethattimeThoughasofthiswritingithasnotyetreachedarelease,CassandraisbeingusedinproductionbysomeofthebiggestpropertiesontheWeb,includingFacebook,Twitter,Cisco,Rackspace,Digg,Cloudkick,Reddit,andmoreCassandrahasbecomesopopularbecauseofitsoutstandingtechnicalfeaturesItisdurable,seamlesslyscalable,andtuneablyconsistentItperformsblazinglyfastwrites,canstorehundredsofterabytesofdata,andisdecentralizedandsymmetricalsothere’snosinglepointoffailureItishighlyavailableandoffersaschemafreedatamodelIsThisBookforYouThisbookisintendedforavarietyofaudiencesItshouldbeusefultoyouifyouare:•Adeveloperworkingwithlargescale,highvolumewebsites,suchasWebsocialapplications•Anapplicationarchitectordataarchitectwhoneedstounderstandtheavailableoptionsforhighperformance,decentralized,elasticdatastores•Adatabaseadministratorordatabasedevelopercurrentlyworkingwithstandardrelationaldatabasesystemswhoneedstounderstandhowtoimplementafaulttolerant,eventuallyconsistentdatastorexvii•Amanagerwhowantstounderstandtheadvantages(anddisadvantages)ofCassandraandrelatedcolumnardatabasestohelpmakedecisionsabouttechnologystrategy•Astudent,analyst,orresearcherwhoisdesigningaprojectrelatedtoCassandraorothernonrelationaldatastoreoptionsThisbookisatechnicalguideInmanyways,CassandrarepresentsanewwayofthinkingaboutdataManydeveloperswhogainedtheirprofessionalchopsinthelast–yearshavebecomewellversedinthinkingaboutdatainpurelyrelationalorobjectorientedtermsCassandra’sdatamodelisverydifferentandcanbedifficulttowrapyourmindaroundatfirst,especiallyforthoseofuswithentrenchedideasaboutwhatadatabaseis(andshouldbe)UsingCassandradoesnotmeanthatyouhavetobeaJavadeveloperHowever,CassandraiswritteninJava,soifyou’regoingtodiveintothesourcecode,asolidunderstandingofJavaiscrucialAlthoughit’snotstrictlynecessarytoknowJava,itcanhelpyoutobetterunderstandexceptions,howtobuildthesourcecode,andhowtousesomeofthepopularclientsManyoftheexamplesinthisbookareinJavaButbecauseoftheinterfaceusedtoaccessCassandra,youcanuseCassandrafromawidevarietyoflanguages,includingC#,Scala,Python,andRubyFinally,itisassumedthatyouhaveagoodunderstandingofhowtheWebworks,canuseanintegrateddevelopmentenvironment(IDE),andaresomewhatfamiliarwiththetypicalconcernsofdatadrivenapplicationsYoumightbeawellseasoneddeveloperoradministratorbutstill,onoccasion,encountertoolsusedintheCassandraworldthatyou’renotfamiliarwithForexample,ApacheIvyisusedtobuildCassandra,andapopularclient(Hector)isavailableviaGitIncaseswhereIspeculatethatyou’llneedtodoalittlesetupofyourowninordertoworkwiththeexamples,ItrytosupportthatWhat’sinThisBookThisbookisdesignedwiththechaptersacting,toareasonableextent,asstandaloneguidesThisisimportantforabookonCassandra,whichhasavarietyofaudiencesandischangingrapidlyToborrowfromthesoftwareworld,Iwantedthebooktobe“modular”sortofIfyou’renewtoCassandra,itmakessensetoreadthebookinorderifyou’vepassedtheintroductorystages,youwillstillfindvalueinlaterchapters,whichyoucanreadasstandaloneguidesHereishowthebookisorganized:Chapter,IntroducingCassandraThischapterintroducesCassandraanddiscusseswhat’sexcitinganddifferentaboutit,whoisusingit,andwhatitsadvantagesareChapter,InstallingCassandraThischapterwalksyouthroughinstallingCassandraonavarietyofplatformsxviii|PrefaceChapter,TheCassandraDataModelHerewelookatCassandra’sdatamodeltounderstandwhatcolumns,supercolumns,androwsareSpecialcareistakentobridgethegapbetweentherelationaldatabaseworldandCassandra’sworldChapter,SampleApplicationThischapterpresentsacompleteworkingapplicationthattranslatesfromarelationalmodelinawellunderstooddomaintoCassandra’sdatamodelChapter,TheCassandraArchitectureThischapterhelpsyouunderstandwhathappensduringreadandwriteoperationsandhowthedatabaseaccomplishessomeofitsnotableaspects,suchasdurabilityandhighavailabilityWegounderthehoodtounderstandsomeofthemorecomplexinnerworkings,suchasthegossipprotocol,hintedhandoffs,readrepairs,Merkletrees,andmoreChapter,ConfiguringCassandraThischaptershowsyouhowtospecifypartitioners,replicaplacementstrategies,andsnitchesWesetupaclusterandseetheimplicationsofdifferentconfigurationchoicesChapter,ReadingandWritingDataThisisthemomentwe’vebeenwaitingforWepresentanoverviewofwhat’sdifferentaboutCassandra’smodelforqueryingandupdatingdata,andthengettoworkusingtheAPIChapter,ClientsThereareavarietyofclientsthatthirdpartydevelopershavecreatedformanydifferentlanguages,includingJava,C#,Ruby,andPython,inordertoabstractCassandra’slowerlevelAPIWehelpyouunderstandthislandscapesoyoucanchooseonethat’srightforyouChapter,MonitoringOnceyourclusterisupandrunning,you’llwanttomonitoritsusage,memorypatterns,andthreadpatterns,andunderstanditsgeneralactivityCassandrahasarichJavaManagementExtensions(JMX)interfacebakedin,whichweputtousetomonitoralloftheseandmoreChapter,MaintenanceTheongoingmaintenanceofaCassandraclusterismadesomewhateasierbysometoolsthatshipwiththeserverWeseehowtodecommissionanode,loadbalancethecluster,getstatistics,andperformotherroutineoperationaltasksChapter,PerformanceTuningOneofCassandra’smostnotablefeaturesisitsspeedit’sveryfastButthereareanumberofthings,includingmemorysettings,datastorage,hardwarechoices,caching,andbuffersizes,thatyoucantunetosqueezeoutevenmoreperformancePreface|xixChapter,IntegratingHadoopInthischapter,writtenbyJeremyHanna,weputCassandrainalargercontextandseehowtointegrateitwiththepopularimplementationofGoogle’sMapReducealgorithm,HadoopAppendixManynewdatabaseshavecroppedupinresponsetotheneedtoscaleatBigDatalevels,ortotakeadvantageofa“schemafree”model,ortosupportmorerecentinitiativessuchastheSemanticWebHerewecontextualizeCassandraagainstavarietyofthemorepopularnonrelationaldatabases,examiningdocumentorienteddatabases,distributedhashtables,andgraphdatabases,tobetterunderstandCassandra’sofferingsGlossaryItcanbedifficulttounderstandsomethingthat’sreallynew,andCassandrahasmanytermsthatmightbeunfamiliartodevelopersorDBAscomingfromtherelationalapplicationdevelopmentworld,soI’veinclud

职业精品

废旧物资处置管理办法.docx

学校固定资产管理制度.doc

机械合同范本.doc

显示屏广告发布合同范本.doc

用户评论

0/200
    暂无评论
上传我的资料

精彩专题

相关资料换一换

  • Cassandra_The_De…

  • Cassandra The De…

  • Cassandra The De…

  • Cassandra The De…

  • Cassandra The De…

  • Cassandra-The De…

  • Cassandra The De…

  • Oreilly.Cassandr…

  • Oreilly.Cassandr…

  • Cassandra The De…

资料评价:

/ 330
所需积分:1 立即下载

意见
反馈

返回
顶部